Skip to content

Commit

Permalink
JONObject#quote should escape U+2028 and U+2029
Browse files Browse the repository at this point in the history
Patch from pvojtechovsky applied
Fixes #19
  • Loading branch information
dkulp committed Mar 18, 2020
1 parent 1db001c commit b5685ed
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/main/java/org/codehaus/jettison/json/JSONObject.java
Original file line number Diff line number Diff line change
Expand Up @@ -1050,6 +1050,12 @@ public static String quote(String string, boolean escapeForwardSlashAlways) {
case '\r':
sb.append("\\r");
break;
case '\u2028':
sb.append("\\u2028");
break;
case '\u2029':
sb.append("\\u2029");
break;
default:
if (c < ' ') {
t = "000" + Integer.toHexString(c);
Expand Down

0 comments on commit b5685ed

Please sign in to comment.