Permalink
Browse files

PIP-936

  • Loading branch information...
1 parent 31d282e commit 6ce4a90395bb73a3ab16d315882a3fb361ca643f Jamie committed Aug 1, 2011
View
2 designer/src/main/java/org/wapama/web/server/UUIDBasedRepositoryServlet.java
@@ -256,8 +256,6 @@ protected void doPost(HttpServletRequest req, HttpServletResponse resp)
String uuid = (String) jsonObject.get("uuid");
String profileName = (String) jsonObject.get("profile");
boolean autosave = jsonObject.getBoolean("savetype");
-
- json = json.replaceAll("<", "&lt;");
if (_logger.isDebugEnabled()) {
_logger.debug("Calling UUIDBasedRepositoryServlet doPost()...");
View
1 designer/src/main/webapp/js/Plugins/propertywindow.js
@@ -241,6 +241,7 @@ WAPAMA.Plugins.PropertyWindow = {
// Shows the Value in the Grid in each Line
value = String(value).gsub("<", "&lt;");
value = String(value).gsub(">", "&gt;");
+ value = String(value).gsub("\"", "&quot;");
value = String(value).gsub("%", "&#37;");
value = String(value).gsub("&", "&amp;");
View
6 designer/src/main/webapp/js/Plugins/uuidRepository.js
@@ -130,6 +130,12 @@ WAPAMA.Plugins.UUIDRepositorySave = WAPAMA.Plugins.AbstractPlugin.extend({
shape.propertyNames[property._jsonProp.id]=property._jsonProp.title
});
+ for (var property in shape.properties) {
+ shape.properties[property] = String(shape.properties[property]).gsub("<", "&lt;");
+ shape.properties[property] = String(shape.properties[property]).gsub(">", "&gt;");
+ shape.properties[property] = String(shape.properties[property]).gsub("\"", "&quot;");
+ shape.properties[property] = String(shape.properties[property]).gsub("%", "&#37;");
+ }
});
}
var serializedDOM = WAPAMA.UI.encode(json);

0 comments on commit 6ce4a90

Please sign in to comment.