[OpenLayers-Trac] [OpenLayers] #3478: Missing slash in location.pathname under Internet Explorer 10

OpenLayers trac-20090302 at openlayers.org
Tue Aug 30 11:11:02 EDT 2011


#3478: Missing slash in location.pathname under Internet Explorer 10
-------------------------------------------------+--------------------------
 Reporter:  vog                                  |       Owner:              
     Type:  bug                                  |      Status:  new         
 Priority:  major                                |   Milestone:  2.11 Release
Component:  Util                                 |     Version:  2.11 RC3    
 Keywords:  ie10 internet explorer 10 slash url  |       State:  Review      
-------------------------------------------------+--------------------------
 The location.pathname property does not have a leading slash in Internet
 Explorer 10. This leads to a strange error message  in
 OpenLayers.Util.createUrlObject():

 {{{
 SCRIPT87: Invalid argument.
 }}}

 The createUrlObject() method already handles this special case near the
 end (line 1510):

 {{{
 urlObject.pathname = (a.pathname.charAt(0) == "/") ? a.pathname : "/" +
 a.pathname;
 }}}

 However, at the beginning of the function, when handling relative paths,
 it uses window.location.pathname without handling this special case.

 The attached patch fixes that.

-- 
Ticket URL: <http://trac.openlayers.org/ticket/3478>
OpenLayers <http://openlayers.org/>
A free AJAX map viewer


More information about the Trac mailing list