Skip to content

Commit

Permalink
[GR-56681] Stop escaping '/' in JSON strings.
Browse files Browse the repository at this point in the history
PullRequest: graal/18469
  • Loading branch information
vjovanov committed Jul 31, 2024
2 parents 41c2c2b + 7bd852f commit cecd104
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -326,7 +326,8 @@ private static String quoteString(String s) {
for (int i = 0; i < s.length(); i++) {
char c = s.charAt(i);
// Escaping rules according to https://www.ietf.org/rfc/rfc4627.txt section 2.5
if (c == '"' || c == '\\' || c == '/') {
// except for '/' because it is unnecessarily verbose.
if (c == '"' || c == '\\') {
escapeSequence(sb, c);
} else if (c == '\b') {
escapeSequence(sb, 'b');
Expand Down

0 comments on commit cecd104

Please sign in to comment.