Bug 704354: r=dolske, a=lsblakk
authorGavin Sharp <gavin@gavinsharp.com>
Mon, 05 Mar 2012 16:24:40 -0800
changeset 35277 f66f339fd046f49028ab3cd58b72b557afb57f2f
parent 35276 855980ed722de7f6785df13d5f7aa3de5a4902e4
child 35278 b2576dbcd6147b7f671b9f96f61ade0cbb72b855
child 35280 0fec8d30c3914ce6b743cac47ac5ac32e261532d
push id2031
push usergsharp@mozilla.com
push dateTue, 06 Mar 2012 00:27:46 +0000
reviewersdolske, lsblakk
bugs704354
milestone1.9.2.28pre
Bug 704354: r=dolske, a=lsblakk
browser/base/content/browser.js
browser/base/content/tabbrowser.xml
--- a/browser/base/content/browser.js
+++ b/browser/base/content/browser.js
@@ -5055,17 +5055,17 @@ var contentAreaDNDObserver = {
       }
 
       let [url, name] = browserDragAndDrop.getDragURLFromDataTransfer(aEvent.dataTransfer);
 
       // valid urls don't contain spaces ' '; if we have a space it
       // isn't a valid url, or if it's a javascript: or data: url,
       // bail out
       if (!url || !url.length || url.indexOf(" ", 0) != -1 ||
-          /^\s*(javascript|data):/.test(url))
+          /^\s*(javascript|data):/i.test(url))
         return;
 
       nsDragAndDrop.dragDropSecurityCheck(aEvent, null, url);
 
       switch (document.documentElement.getAttribute('windowtype')) {
         case "navigator:browser":
           var postData = { };
           var uri = getShortcutOrURI(url, postData);
--- a/browser/base/content/tabbrowser.xml
+++ b/browser/base/content/tabbrowser.xml
@@ -2163,17 +2163,17 @@
                   break;
                 }
               }
               NS_ASSERT(url, "In the drop event, at least one mime-type should match our supported types");
 
               // valid urls don't contain spaces ' '; if we have a space it isn't a valid url.
               // Also disallow dropping javascript: or data: urls--bail out
               if (!url || !url.length || url.indexOf(" ", 0) != -1 ||
-                  /^\s*(javascript|data):/.test(url))
+                  /^\s*(javascript|data):/i.test(url))
                 return;
 
               // XXXmano: temporary fix until dragDropSecurityCheck make the
               // drag-session an optional paramter
               var dragService = Cc["@mozilla.org/widget/dragservice;1"].
                                 getService(Ci.nsIDragService);
               var dragSession = dragService.getCurrentSession();
               nsDragAndDrop.dragDropSecurityCheck(aEvent, dragSession, url);