We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 6d340cd commit 178512aCopy full SHA for 178512a
1 file changed
java/src/main/java/com/genexus/internet/HttpContext.java
@@ -28,6 +28,7 @@
28
import com.genexus.webpanels.GXWebObjectBase;
29
import com.genexus.webpanels.WebSession;
30
31
+import com.genexus.webpanels.WebUtils;
32
import json.org.json.IJsonFormattable;
33
import json.org.json.JSONArray;
34
import json.org.json.JSONException;
@@ -933,7 +934,7 @@ public void SendState()
933
934
AddStylesheetsToLoad();
935
if (isSpaRequest())
936
{
- writeTextNL("<script>gx.ajax.saveJsonResponse(" + getJSONResponse() + ");</script>");
937
+ writeTextNL("<script>gx.ajax.saveJsonResponse(" + WebUtils.htmlEncode(JSONObject.quote(getJSONResponse()), true) + ");</script>");
938
}
939
else
940
0 commit comments