incubator-sling-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jus...@apache.org
Subject svn commit: r1036966 - /sling/trunk/bundles/commons/json/src/main/java/org/apache/sling/commons/json/JSONObject.java
Date Fri, 19 Nov 2010 18:10:22 GMT
Author: justin
Date: Fri Nov 19 18:10:22 2010
New Revision: 1036966

URL: http://svn.apache.org/viewvc?rev=1036966&view=rev
Log:
fixing SLING-1813 by copying lines 1147 and 1148 from
http://www.JSON.org/java/org/json/JSONObject.java

Modified:
    sling/trunk/bundles/commons/json/src/main/java/org/apache/sling/commons/json/JSONObject.java

Modified: sling/trunk/bundles/commons/json/src/main/java/org/apache/sling/commons/json/JSONObject.java
URL: http://svn.apache.org/viewvc/sling/trunk/bundles/commons/json/src/main/java/org/apache/sling/commons/json/JSONObject.java?rev=1036966&r1=1036965&r2=1036966&view=diff
==============================================================================
--- sling/trunk/bundles/commons/json/src/main/java/org/apache/sling/commons/json/JSONObject.java
(original)
+++ sling/trunk/bundles/commons/json/src/main/java/org/apache/sling/commons/json/JSONObject.java
Fri Nov 19 18:10:22 2010
@@ -961,7 +961,8 @@ public class JSONObject {
                 sb.append("\\r");
                 break;
             default:
-                if (c < ' ') {
+                if (c < ' ' || (c >= '\u0080' && c < '\u00a0') ||
+                               (c >= '\u2000' && c < '\u2100')) {
                     t = "000" + Integer.toHexString(c);
                     sb.append("\\u" + t.substring(t.length() - 4));
                 } else {



Mime
View raw message