[#3079] Fix config parsing for json objects

* If a curly brace was used in a string then find_json_ojects would
   fail to find objects correctly. To fix this ignore double-quoted entries.
This commit is contained in:
Calum Lind 2017-06-28 10:32:35 +01:00
parent 65fac156eb
commit 6d14be18b0

View file

@ -111,8 +111,13 @@ def find_json_objects(s):
if start < 0:
return []
quoted = False
for index, c in enumerate(s[offset:]):
if c == "{":
if c == '"':
quoted = not quoted
elif quoted:
continue
elif c == "{":
opens += 1
elif c == "}":
opens -= 1