Ascii character code 127 (DEL) is not printable and must be quoted. (#5984)
This is a follow-up to #5823.
This commit is contained in:
parent
6ca9ad6608
commit
a0f39e0ab4
6 changed files with 9 additions and 9 deletions
|
|
@ -1001,7 +1001,7 @@ proc escapeJson*(s: string; result: var string) =
|
|||
result.add("\"")
|
||||
for x in runes(s):
|
||||
var r = int(x)
|
||||
if r >= 32 and r <= 127:
|
||||
if r >= 32 and r <= 126:
|
||||
var c = chr(r)
|
||||
case c
|
||||
of '"': result.add("\\\"")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue