More robust fix, escaping all args to the glass panel display code
git-svn-id: https://google-web-toolkit.googlecode.com/svn/trunk@10461 8db76d5a-ed1c-0410-87a9-c151d255dfc7
diff --git a/dev/core/src/com/google/gwt/core/ext/linker/impl/devmode.js b/dev/core/src/com/google/gwt/core/ext/linker/impl/devmode.js
index 1a9d9f0..6fae5db 100644
--- a/dev/core/src/com/google/gwt/core/ext/linker/impl/devmode.js
+++ b/dev/core/src/com/google/gwt/core/ext/linker/impl/devmode.js
@@ -123,8 +123,8 @@
outer.innerHTML =
'<div style="position:absolute;z-index:' + __gwt_glassMessageZIndex-- +
';left:50px;top:50px;width:600px;color:#FFF;font-family:verdana;text-align:left;">' +
- '<div style="font-size:30px;font-weight:bold;">' + summary + '</div>' +
- '<div style="font-size:15px;">' + details + '</div>' +
+ '<div style="font-size:30px;font-weight:bold;">' + simpleEscape(summary) + '</div>' +
+ '<div style="font-size:15px;">' + simpleEscape(details) + '</div>' +
'</div>' +
'<div style="position:absolute;z-index:' + __gwt_glassMessageZIndex-- +
';left:0px;top:0px;right:0px;bottom:0px;filter:alpha(opacity=60);opacity:0.6;background-color:#000;"></div>'
@@ -155,7 +155,7 @@
glassStyle.setExpression("height", "document.documentElement.clientHeight");
}
- $doc.title = summary + " [" + $doc.title + "]";
+ $doc.title = simpleEscape(summary) + " [" + $doc.title + "]";
}
@@ -314,8 +314,7 @@
if ($errFn) {
$errFn($moduleName);
} else {
- __gwt_displayGlassMessage("Plugin failed to connect to Development Mode server at " +
- simpleEscape(codeServer),
+ __gwt_displayGlassMessage("Plugin failed to connect to Development Mode server at " + codeServer,
"Follow the underlying troubleshooting instructions");
loadIframe("http://code.google.com/p/google-web-toolkit/wiki/TroubleshootingOOPHM");
}
@@ -325,6 +324,7 @@
return originalString.replace("&","&")
.replace("<","<")
.replace(">",">")
+ .replace("\'", "'")
.replace("\"",""");
}
diff --git a/dev/core/src/com/google/gwt/core/ext/linker/impl/hosted.html b/dev/core/src/com/google/gwt/core/ext/linker/impl/hosted.html
index f6c5d82..7ca5c31 100644
--- a/dev/core/src/com/google/gwt/core/ext/linker/impl/hosted.html
+++ b/dev/core/src/com/google/gwt/core/ext/linker/impl/hosted.html
@@ -176,8 +176,8 @@
outer.innerHTML =
'<div style="position:absolute;z-index:' + __gwt_glassMessageZIndex-- +
';left:50px;top:50px;width:600px;color:#FFF;font-family:verdana;text-align:left;">' +
- '<div style="font-size:30px;font-weight:bold;">' + summary + '</div>' +
- '<div style="font-size:15px;">' + details + '</div>' +
+ '<div style="font-size:30px;font-weight:bold;">' + simpleEscape(summary) + '</div>' +
+ '<div style="font-size:15px;">' + simpleEscape(details) + '</div>' +
'</div>' +
'<div style="position:absolute;z-index:' + __gwt_glassMessageZIndex-- +
';left:0px;top:0px;right:0px;bottom:0px;filter:alpha(opacity=60);opacity:0.6;background-color:#000;"></div>'
@@ -208,7 +208,7 @@
glassStyle.setExpression("height", "document.documentElement.clientHeight");
}
- $doc.title = summary + " [" + $doc.title + "]";
+ $doc.title = simpleEscape(summary) + " [" + $doc.title + "]";
}
function findPluginObject() {
@@ -295,8 +295,7 @@
if (errFn) {
errFn(modName);
} else {
- __gwt_displayGlassMessage("Plugin failed to connect to Development Mode server at " +
- simpleEscape($hosted),
+ __gwt_displayGlassMessage("Plugin failed to connect to Development Mode server at " + $hosted,
"Follow the underlying troubleshooting instructions");
loadIframe("http://code.google.com/p/google-web-toolkit/wiki/TroubleshootingOOPHM");
}
@@ -308,6 +307,7 @@
return originalString.replace("&","&")
.replace("<","<")
.replace(">",">")
+ .replace("\'", "'")
.replace("\"",""");
}