Properly escape double-quotes in wmlparser,
...the only thing not done by python's repr()
This commit is contained in:
parent
d147a1255f
commit
d6f6070c57
1 changed files with 1 additions and 0 deletions
|
@ -821,6 +821,7 @@ Massage a string into what appears to be a JSON-compatible form
|
|||
"""
|
||||
s = repr(string)
|
||||
front = s.index("'")
|
||||
s = s.replace('"', '\\"')
|
||||
return '"%s"' % s[front+1:len(s)-1]
|
||||
|
||||
def jsonify(tree, verbose=False, depth=0):
|
||||
|
|
Loading…
Add table
Reference in a new issue