From ab7d12e5de36a223fa1f5b68e8d3d5a925857b67 Mon Sep 17 00:00:00 2001 From: Honza Kral Date: Sun, 14 Jul 2013 15:36:49 +0200 Subject: [PATCH] Encode URL params properly into utf-8 --- elasticsearch/client/utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/elasticsearch/client/utils.py b/elasticsearch/client/utils.py index 58dd680a..919a579a 100644 --- a/elasticsearch/client/utils.py +++ b/elasticsearch/client/utils.py @@ -19,7 +19,7 @@ def _escape(part): part = ','.join(part) if isinstance(part, (type(''), type(u''))): # mark ',' as safe for nicer url in logs - return quote_plus(part, ',') + return quote_plus(part.encode('utf-8'), ',') return str(part) def _escape_param(value):