You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by lu...@apache.org on 2012/04/18 01:14:28 UTC
svn commit: r1327320 -
/myfaces/tomahawk/trunk/sandbox/core/src/main/java/org/apache/myfaces/custom/suggestajax/tablesuggestajax/TableSuggestAjaxRenderer.java
Author: lu4242
Date: Tue Apr 17 23:14:27 2012
New Revision: 1327320
URL: http://svn.apache.org/viewvc?rev=1327320&view=rev
Log:
TOMAHAWK-1578 Quotes are not escaped in TableAutoSuggest in ajax requests (Thanks to Marcus Büttner for provide this patch)
Modified:
myfaces/tomahawk/trunk/sandbox/core/src/main/java/org/apache/myfaces/custom/suggestajax/tablesuggestajax/TableSuggestAjaxRenderer.java
Modified: myfaces/tomahawk/trunk/sandbox/core/src/main/java/org/apache/myfaces/custom/suggestajax/tablesuggestajax/TableSuggestAjaxRenderer.java
URL: http://svn.apache.org/viewvc/myfaces/tomahawk/trunk/sandbox/core/src/main/java/org/apache/myfaces/custom/suggestajax/tablesuggestajax/TableSuggestAjaxRenderer.java?rev=1327320&r1=1327319&r2=1327320&view=diff
==============================================================================
--- myfaces/tomahawk/trunk/sandbox/core/src/main/java/org/apache/myfaces/custom/suggestajax/tablesuggestajax/TableSuggestAjaxRenderer.java (original)
+++ myfaces/tomahawk/trunk/sandbox/core/src/main/java/org/apache/myfaces/custom/suggestajax/tablesuggestajax/TableSuggestAjaxRenderer.java Tue Apr 17 23:14:27 2012
@@ -326,10 +326,14 @@ public class TableSuggestAjaxRenderer ex
response.append("\"label\": ");
response.append("\"").append(escapeQuotes(htmlOutputText.getLabel())).append("\",");
response.append("\"value\": ");
- response.append("\"").append(escapeQuotes(htmlOutputText.getValue().toString())).append("\"");
+ response.append("\"")
+ .append(htmlOutputText.getValue() != null ? escapeQuotes(htmlOutputText.getValue().toString()) : "")
+ .append("\"");
} else {
response.append("\"label\": ");
- response.append("\"").append(escapeQuotes(htmlOutputText.getValue().toString())).append("\"");
+ response.append("\"")
+ .append(htmlOutputText.getValue() != null ? escapeQuotes(htmlOutputText.getValue().toString()) : "")
+ .append("\"");
}
response.append("}");
if (columnChildren.hasNext() || columns.hasNext()) {