myfaces-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lof...@apache.org
Subject svn commit: r1178768 - /myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/util/HtmlWriterUtils.java
Date Tue, 04 Oct 2011 12:29:55 GMT
Author: lofwyr
Date: Tue Oct  4 12:29:54 2011
New Revision: 1178768

URL: http://svn.apache.org/viewvc?rev=1178768&view=rev
Log:
TOBAGO-1032: Ajax doesn't work, because of a JSON parse error (escaping of CR+LF in attributes)

Modified:
    myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/util/HtmlWriterUtils.java

Modified: myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/util/HtmlWriterUtils.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/util/HtmlWriterUtils.java?rev=1178768&r1=1178767&r2=1178768&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/util/HtmlWriterUtils.java
(original)
+++ myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/util/HtmlWriterUtils.java
Tue Oct  4 12:29:54 2011
@@ -36,6 +36,8 @@ public final class HtmlWriterUtils {
     CHARS_TO_ESCAPE['&'] = "&".toCharArray();
     CHARS_TO_ESCAPE['<'] = "&lt;".toCharArray();
     CHARS_TO_ESCAPE['>'] = "&gt;".toCharArray();
+    CHARS_TO_ESCAPE['\n'] = "&#13;".toCharArray();
+    CHARS_TO_ESCAPE['\r'] = "&#10;".toCharArray();
   }
 
   private final Writer out;



Mime
View raw message