Document why this hack is only applied in a limited set of situations;

(Closes #3478)
This commit is contained in:
Christopher Schmidt
2011-09-19 21:32:22 -04:00
parent 4622f3221d
commit 9fc1cfc30f

View File

@@ -1505,7 +1505,11 @@ OpenLayers.Util.createUrlObject = function(url, options) {
} }
urlObject.args = OpenLayers.Util.getParameters(queryString); urlObject.args = OpenLayers.Util.getParameters(queryString);
//pathname (uniform browser behavior with leading "/") // pathname
//
// This is a workaround for Internet Explorer where
// window.location.pathname has a leading "/", but
// a.pathname has no leading "/".
urlObject.pathname = (a.pathname.charAt(0) == "/") ? a.pathname : "/" + a.pathname; urlObject.pathname = (a.pathname.charAt(0) == "/") ? a.pathname : "/" + a.pathname;
return urlObject; return urlObject;