Last modified: 2014-02-12 23:53:15 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T33326, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 31326 - Embedding Wikipedia Mobile pages throws error
Embedding Wikipedia Mobile pages throws error
Status: RESOLVED FIXED
Product: MobileFrontend
Classification: Unclassified
stable (Other open bugs)
unspecified
All All
: Normal minor
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2011-10-03 14:46 UTC by gleitz
Modified: 2014-02-12 23:53 UTC (History)
10 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments
Error message on an iPhone (143.89 KB, image/png)
2011-10-03 14:46 UTC, gleitz
Details

Description gleitz 2011-10-03 14:46:48 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.
Comment 1 Brion Vibber 2011-10-03 16:11:59 UTC
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?
Comment 2 Patrick Reilly 2011-10-03 21:31:51 UTC
This should now be fixed in r98809.
Comment 3 gleitz 2011-10-03 21:33:11 UTC
What a quick turnaround. Thanks all!
Comment 4 gleitz 2011-10-09 17:36:53 UTC
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" ?
Comment 5 Patrick Reilly 2011-10-10 17:18:02 UTC
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?
Comment 6 gleitz 2011-10-12 05:09:15 UTC
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.

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links