Skip to content

Commit

Permalink
fixed jsstring function to perform proper JSON string char escaping.
Browse files Browse the repository at this point in the history
E.g. a ' char doesn't need to be escaped because it produces errors in
JSON.parse() otherwise. This fixes #16.
  • Loading branch information
jens-maus committed Nov 11, 2020
1 parent ff50524 commit 795b7c5
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.7.0
1.7.1
4 changes: 2 additions & 2 deletions www/config_js.cgi
Original file line number Diff line number Diff line change
Expand Up @@ -50,11 +50,11 @@ proc jsstring { value } {
return [string map {
"\\" "\\"
"\"" "\\\""
"\'" "\\\'"
"\t" "\\t"
"\r" "\\r"
"\n" "\\n"

"\b" "\\b"
"\f" "\\f"
} $value]
}

Expand Down

0 comments on commit 795b7c5

Please sign in to comment.