Show More
@@ -387,8 +387,8 b' class normcasespecs(object):' | |||
|
387 | 387 | other = 0 |
|
388 | 388 | |
|
389 | 389 | _jsonmap = [] |
|
390 |
_jsonmap.extend("\\u%04x" % x for x in |
|
|
391 |
_jsonmap.extend(chr(x) for x in |
|
|
390 | _jsonmap.extend("\\u%04x" % x for x in range(32)) | |
|
391 | _jsonmap.extend(chr(x) for x in range(32, 127)) | |
|
392 | 392 | _jsonmap.append('\\u007f') |
|
393 | 393 | _jsonmap[0x09] = '\\t' |
|
394 | 394 | _jsonmap[0x0a] = '\\n' |
@@ -400,7 +400,7 b' class normcasespecs(object):' | |||
|
400 | 400 | _paranoidjsonmap = _jsonmap[:] |
|
401 | 401 | _paranoidjsonmap[0x3c] = '\\u003c' # '<' (e.g. escape "</script>") |
|
402 | 402 | _paranoidjsonmap[0x3e] = '\\u003e' # '>' |
|
403 |
_jsonmap.extend(chr(x) for x in |
|
|
403 | _jsonmap.extend(chr(x) for x in range(128, 256)) | |
|
404 | 404 | |
|
405 | 405 | def jsonescape(s, paranoid=False): |
|
406 | 406 | '''returns a string suitable for JSON |
General Comments 0
You need to be logged in to leave comments.
Login now