Last modified: 2014-02-12 23:53:15 UTC
Created attachment 9151 [details] Error message on an iPhone When embedding a mobile Wikipedia page in an iframe, the Javascript run from within the iframe causes the following error on an iPhone: NO_MODIFICATION_ALOWED_ERR: DOM EXCEPTION 7 The offending file is http://bits.wikimedia.org/w/extensions-1.17/MobileFrontend/javascripts/application.js?version=20110920T172820Z Specifically, like 70: decode.innerHTML = unescape( decode.innerHTML ) The use of innerHTML is not allowed in Mobile Safari. I believe innerText should be used instead. Here is an example in a JSFiddle: http://jsfiddle.net/swLYU/ If you view that link on an iPhone, click "Run" and you will see the error. This is an unfortunate error as it hinders iPhone development with Wikipedia pages.
That bit of code doesn't make a lot of sense to me to begin with; seems to imply that output is double-escaping some things, and this is some attempt to de-escape them?
This should now be fixed in r98809.
What a quick turnaround. Thanks all!
I am still seeing this error. Is there a way to know when r98809 has been pushed to production? Will the status on https://www.mediawiki.org/wiki/Special:Code/MediaWiki/98809 change from "new" ?
It appears to be live to me: http://bits.wikimedia.org/w/extensions-1.18/MobileFrontend/javascripts/application.js Can you try clearing your cache?
When I load this page: http://en.m.wikipedia.org/wiki/George_Fuller_(Australian_politician) It loads this script (note the version number) http://bits.wikimedia.org/w/extensions-1.18/MobileFrontend/javascripts/application.js?version=20110920T172820Z While application.js seems to have the innerHTML removed, that particular version does not.