Last modified: 2014-02-12 23:53:22 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 T44492, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 42492 - MobileFrontend strips too much content in images disabled mode
MobileFrontend strips too much content in images disabled mode
Status: RESOLVED FIXED
Product: MobileFrontend
Classification: Unclassified
stable (Other open bugs)
unspecified
All All
: Unprioritized normal
: ---
Assigned To: Jon
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2012-11-28 07:02 UTC by Jon
Modified: 2014-02-12 23:53 UTC (History)
11 users (show)

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


Attachments

Description Jon 2012-11-28 07:02:06 UTC
In non-beta when images are disabled images are replaced with a link and alt text like so (on Barack Obama article):
 
<a href="/w/index.php/File:Official_portrait_of_Barack_Obama.jpg" class="image"><span class="mw-mf-image-replacement">[A portrait shot of Barack Obama, looking straight ahead. He has short black hair, and is wearing a dark navy blazer with a blue striped tie over a light blue collared shirt. In the background are two flags hanging from separate flagpoles: the American flag, and the flag of the Executive Office of the President.]</span></a>

The api doesn't replace the images like this - it simply strips it altogether. The API should be consistent with the mobile site rendering.
Comment 1 Jon 2012-12-07 20:05:53 UTC
This doesn't seem to be a problem with the API but rather MobileFormatter.

To be exact go to http://en.m.wikipedia.org/wiki/Barack_Obama#section_1 see "Obama with his half-sister" - disable images - boom - that disappears completely
Comment 2 Brion Vibber 2012-12-07 20:08:31 UTC
parseItemsToRemove() adds these to the removals list...

		if ( $this->removeImages ) {
			$removals['TAG'][] = "img";
			$removals['TAG'][] = "audio";
			$removals['TAG'][] = "video";
			$removals['CLASS'][] = "thumb tright";
			$removals['CLASS'][] = "thumb tleft";
			$removals['CLASS'][] = "thumbcaption";
			$removals['CLASS'][] = "gallery";
		}

There's special handling for 'img' to do the alt text removal, but the 'thumb tright' and 'thumb tleft' will probably just get removed entirely... which matches what we're seeing on the Obama and Supernatural pages.

Perhaps remove these from the removals list?
Comment 3 Jon 2012-12-07 22:18:32 UTC
Merged https://gerrit.wikimedia.org/r/#/c/37514/

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


Navigation
Links