applying patch from #455 - fixes url equivalence testing for Opera browser

git-svn-id: http://svn.openlayers.org/trunk/openlayers@2124 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
euzuro
2007-01-03 01:00:51 +00:00
parent 6df9e31441
commit 0dbf64d096

View File

@@ -798,6 +798,13 @@ OpenLayers.Util.createUrlObject = function(url, options) {
//pathname (this part allows for relative <-> absolute comparison) //pathname (this part allows for relative <-> absolute comparison)
urlObject.pathname = a.pathname; 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 //hash
urlObject.hash = (options.ignoreHash) ? "" : a.hash; urlObject.hash = (options.ignoreHash) ? "" : a.hash;