Page MenuHomePhabricator

Imagemap: Space after imagesize prevent thumbnailing
Closed, ResolvedPublic

Description

A space after the imagesize prevent thumbnailing of the image, see
[[de:Benutzer:Raymond/imagemap_bug]]


Version: 1.10.x
Severity: normal
URL: http://de.wikipedia.org/wiki/Benutzer:Raymond/imagemap_bug

Details

Reference
bz8582

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 21 2014, 9:32 PM
bzimport added a project: MediaWiki-Parser.
bzimport set Reference to bz8582.
bzimport added a subscriber: Unknown Object (MLST).

I think we should be able do trim the options list in makeImage, but I'm not
100% positive it won't affect other things, so I'll not commit, but just post
the patch here for another developer to look over. It should fix your problem,
however:

Index: Parser.php

  • Parser.php (revision 19123)

+++ Parser.php (working copy)
@@ -4373,7 +4373,7 @@

  1. * center center the image
  2. * framed Keep original image size, no magnify-button.
  • $part = explode( '|', $options);

+ $part = array_map( 'trim', explode( '|', $options) );

$mwThumb  =& MagicWord::get( 'img_thumbnail' );
$mwManualThumb =& MagicWord::get( 'img_manualthumb' );

Seems okay after sitting on it awhile, applied in r20540