Page MenuHomePhabricator

Issues with manual thumbnails
Closed, ResolvedPublic

Description

The output for [[Image:Bad.jpg|thumb=Foobar.jpg|Title]] is:

<div class="thumb tright"><div class="thumbinner" style="width:1943px;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" class="thumbimage" srcset="http://example.com/images/0/09/Bad.jpg 1.5x, http://example.com/images/0/09/Bad.jpg 2x" /></a> <div class="thumbcaption"><div class="magnify"><a href="/wiki/File:Bad.jpg" class="internal" title="Enlarge"><img src="/skins/common/images/magnify-clip.png" width="15" height="11" alt="" /></a></div>Title</div></div></div>

This has several problems:

  1. This output is from parserTests, where Bad is supposed to be a blacklisted image; that doesn't seem to be getting caught.
  2. presumably the <a href> link should be to the image (ie, Bad.jpg) not to the thumbnail
  3. the src and srcset are inconsistent. (Using the thumbnail for src but the original image for srcset.)

Version: 1.21.x
Severity: normal

Details

Reference
bz45405

Event Timeline

bzimport raised the priority of this task from to High.Nov 22 2014, 1:25 AM
bzimport added a project: MediaWiki-Parser.
bzimport set Reference to bz45405.
bzimport added a subscriber: Unknown Object (MLST).

The blacklist issue (#1 above) is explained by https://www.mediawiki.org/wiki/Special:Code/MediaWiki/100932 -- apparently we can't test the blacklist from parserTests?

The other two issues seem to still be legit.

Thanks for the report and your patch!