diff --git a/platypush/message/request/__init__.py b/platypush/message/request/__init__.py index 0ae83f32..d02c1802 100644 --- a/platypush/message/request/__init__.py +++ b/platypush/message/request/__init__.py @@ -109,7 +109,11 @@ class Request(Message): try: exec('{}={}'.format(k, v)) except: - exec('{}="{}"'.format(k, v)) + if isinstance(v, str): + try: + exec('{}="{}"'.format(k, re.sub('(^|[^\\\])"', '\1\\"', v))) + except: + pass parsed_value = '' while value: