diff options
author | Haoyu Qiu <timothyqiu32@gmail.com> | 2021-11-11 13:18:09 +0800 |
---|---|---|
committer | Haoyu Qiu <timothyqiu32@gmail.com> | 2021-11-11 13:18:09 +0800 |
commit | 367d75fab0ba0e8f6bc76da1ef182fc342c4fa0d (patch) | |
tree | bd7e672892dbd16fa1df5af98cc59925f1b93750 /core/string | |
parent | 7211012c4f1a737a78436a55fd1c66d7e323b668 (diff) |
Add missing characters for property name quoting
Diffstat (limited to 'core/string')
-rw-r--r-- | core/string/ustring.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/core/string/ustring.cpp b/core/string/ustring.cpp index 8d6da31cf3..25c21486d6 100644 --- a/core/string/ustring.cpp +++ b/core/string/ustring.cpp @@ -4420,7 +4420,7 @@ String String::property_name_encode() const { // as well as '"', '=' or ' ' (32) const char32_t *cstr = get_data(); for (int i = 0; cstr[i]; i++) { - if (cstr[i] == '=' || cstr[i] == '"' || cstr[i] < 33 || cstr[i] > 126) { + if (cstr[i] == '=' || cstr[i] == '"' || cstr[i] == ';' || cstr[i] == '[' || cstr[i] == ']' || cstr[i] < 33 || cstr[i] > 126) { return "\"" + c_escape_multiline() + "\""; } } |