themeName = getDefaultTheme();
}
}
+
+ // XSS preventation, theme names shouldn't contain special chars anyway
+ themeName = JsonPaintTarget.escapeJSON(themeName);
+
return themeName;
}
String pathInfo = getRequestPathInfo(request);
if (pathInfo == null) {
pathInfo = "/";
+ } else {
+ pathInfo = JsonPaintTarget.escapeJSON(pathInfo);
}
- page.write("pathInfo: '" + pathInfo + "', ");
+ page.write("pathInfo: \"" + pathInfo + "\", ");
if (window != application.getMainWindow()) {
page.write("windowName: '" + window.getName() + "', ");
}