[openstreetmap-website] IE11 and IE10 fail to display anything in panel after clicking on a search result (#932)

davidearl notifications at github.com
Tue Mar 17 11:55:23 UTC 2015


Sorry about this, I know how much you hate Internet Explorer... this is the current version, not an old one.

If you search for a street (I used the search string "Middleton Close, Cambridge") it displays the result correctly, but if you click on that result, you get a blank left panel.

Opening the debugger it seems it is aborting the Javascript execution because of an error at
var a=t.getResponseHeader("X-Page-Title");document.title=decodeURIComponent(escape(a))
with error "SCRIPT5025 : The URI to be decoded is not a valid encoding"
Examnining variable a, it shows
  "OpenStreetMap | Way: ‪Middleton Close‬ (‪331105333‬)"
(i.e. with the a-hat and euro symbol etc).

X-Page-Title is 
"OpenStreetMap | Way: %E2%80%AAMiddleton Close%E2%80%AC (%E2%80%AA331105333%E2%80%AC)"

It appears these strings contain open and close left-to-right embedding UTF-8 characters 0xE280AA and 0xE280AC. escape produces %u... for these, and decodeURIComponent blows up on this in IE11. escape is deprecated. I'm not sure what is trying to be achieved here. Incidentally the debugger shows the X-Page-Title string in decoded form and Chrome doesn't, but this may just be the debugger - or maybe it could indicate that IE11 is decoding this string when you aren't expecting it to.

If you refresh the page (that is, so that the URL "http://www.openstreetmap.org/way/331105333" fetches the way info directly, then it does display it OK, presumably because the title is already set in the HTML so this Javascript doesn't need to be executed.

IE9 and IE8 (ironically, given yesterday's IE8 bug) are fine!

---
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/issues/932
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20150317/44e5bcb1/attachment.html>


More information about the rails-dev mailing list