[OpenLayers-Commits] r2124 - trunk/openlayers/lib/OpenLayers

commits at openlayers.org commits at openlayers.org
Tue Jan 2 20:00:51 EST 2007


Author: euzuro
Date: 2007-01-02 20:00:51 -0500 (Tue, 02 Jan 2007)
New Revision: 2124

Modified:
   trunk/openlayers/lib/OpenLayers/Util.js
Log:
applying patch from #455 - fixes url equivalence testing for Opera browser

Modified: trunk/openlayers/lib/OpenLayers/Util.js
===================================================================
--- trunk/openlayers/lib/OpenLayers/Util.js	2007-01-02 23:58:02 UTC (rev 2123)
+++ trunk/openlayers/lib/OpenLayers/Util.js	2007-01-03 01:00:51 UTC (rev 2124)
@@ -798,6 +798,13 @@
   //pathname (this part allows for relative <-> absolute comparison)
     urlObject.pathname = a.pathname;  
     
+    //Test to see if the pathname includes the arguments (this happens in Opera)
+    var qIndex = urlObject.pathname.indexOf("?");
+    if (qIndex != -1) {
+        urlObject.pathname = urlObject.pathname.substring(0, qIndex);
+    }
+
+    
   //hash
     urlObject.hash = (options.ignoreHash) ? "" : a.hash;  
     



More information about the Commits mailing list