Revision: 10461
Author:   [email protected]
Date:     Fri Jul 15 15:31:39 2011
Log:      More robust fix, escaping all args to the glass panel display code

http://code.google.com/p/google-web-toolkit/source/detail?r=10461

Modified:
 /trunk/dev/core/src/com/google/gwt/core/ext/linker/impl/devmode.js
 /trunk/dev/core/src/com/google/gwt/core/ext/linker/impl/hosted.html

=======================================
--- /trunk/dev/core/src/com/google/gwt/core/ext/linker/impl/devmode.js Thu Jul 14 13:38:35 2011 +++ /trunk/dev/core/src/com/google/gwt/core/ext/linker/impl/devmode.js Fri Jul 15 15:31:39 2011
@@ -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("&","&amp;")
     .replace("<","&lt;")
     .replace(">","&gt;")
+    .replace("\'", "&#39;")
     .replace("\"","&quot;");
 }

=======================================
--- /trunk/dev/core/src/com/google/gwt/core/ext/linker/impl/hosted.html Thu Jul 14 13:38:35 2011 +++ /trunk/dev/core/src/com/google/gwt/core/ext/linker/impl/hosted.html Fri Jul 15 15:31:39 2011
@@ -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("&","&amp;")
     .replace("<","&lt;")
     .replace(">","&gt;")
+    .replace("\'", "&#39;")
     .replace("\"","&quot;");
 }

--
http://groups.google.com/group/Google-Web-Toolkit-Contributors

Reply via email to