Page MenuHomePhabricator

Gallery media is erroneously using sub-typeof if format is supplied
Open, MediumPublic

Description

For example,

<gallery>
Test.jpg|thumb|123
</gallery>

yields,

... <figure-inline typeof="mw:Image/Thumb"> ...

where "thumb" should be ignored.

Maybe move up the "none" we place at the end so that subsequent formats become bogus,
https://github.com/wikimedia/parsoid/blob/master/lib/ext/Gallery/index.js#L145

Or, strip it before transferring,
https://github.com/wikimedia/parsoid/blob/master/lib/ext/Gallery/modes.js#L120