myfaces-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From we...@apache.org
Subject [myfaces-tobago] 07/09: Tobago-1999: fix: SuggestRenderer: escape '"' in json
Date Thu, 09 Jul 2020 08:59:31 GMT
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

commit 6158331596a1aae389fa6f01b065402fe35f69fe
Author: Volker Weber <v.weber@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("\"", "\\\"");
   }
 
 }


Mime
View raw message