You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by we...@apache.org on 2020/04/21 15:00:17 UTC

[myfaces-tobago] branch TOBAGO-1999_Select2 updated: Tobago-1999: fix: SuggestRenderer: escape '"' in json

This is an automated email from the ASF dual-hosted git repository.

weber pushed a commit to branch TOBAGO-1999_Select2
in repository https://gitbox.apache.org/repos/asf/myfaces-tobago.git


The following commit(s) were added to refs/heads/TOBAGO-1999_Select2 by this push:
     new b04481d  Tobago-1999: fix: SuggestRenderer: escape '"' in json
b04481d is described below

commit b04481dfee56c7cc65655e7203c88ed05ed0faa3
Author: Volker Weber <v....@inexso.de>
AuthorDate: Tue Apr 21 14:04:57 2020 +0200

    Tobago-1999: fix: SuggestRenderer: escape '"' in json
---
 .../tobago/renderkit/html/standard/standard/tag/SuggestRenderer.java    | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/SuggestRenderer.java b/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/SuggestRenderer.java
index 6cd6519..b588db1 100644
--- a/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/SuggestRenderer.java
+++ b/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/SuggestRenderer.java
@@ -170,7 +170,7 @@ public class SuggestRenderer extends InputRendererBase {
   }
 
   private String encode(String value) {
-    return value.replace("\"", "\\\"").replace("\\", "\\\\");
+    return value.replace("\\", "\\\\").replace("\"", "\\\"");
   }
 
 }