File tree Expand file tree Collapse file tree 1 file changed +6
-5
lines changed
Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -18,15 +18,16 @@ namespace Format
1818Json json;
1919
2020/*
21- * Check for invalid characters and replace them - can break browser
22- * operation otherwise.
21+ * JSON requires control characters, quotes and reverse solidus (backslash) to be escaped.
2322 *
24- * This can occur if filenames become corrupted, so here we just
25- * substitute an underscore _ for anything which fails to match UTF8.
23+ * All other codepoints from 0x20 to 0xff are left unchanged.
24+ * This is typically UTF8 but it could be binary or some other application-defined encoding.
25+ *
26+ * Therefore no validation is performed on the data.
2627 */
2728void Json::escape (String& value) const
2829{
29- escapeControls (value, Option::unicode | Option:: doublequote | Option::backslash);
30+ escapeControls (value, Option::doublequote | Option::backslash);
3031}
3132
3233void Json::quote (String& value) const
You can’t perform that action at this time.
0 commit comments