Page MenuHomePhabricator

Markups in alt param of <gallery> are "eaten" during parsing
Closed, ResolvedPublic

Description

alt should be some plain text.

Wikitext:

<gallery>
File:Wiki.png|cap'''t'''ion|alt=x'''y'''z
</gallery>

Actual:

<ul class="gallery">
<li class="gallerybox" style="width: 155px">
<div style="width: 155px">
<div class="thumb" style="width: 150px;">
<div style="margin:15px auto;"><a href="/wiki/File:Wiki.png" class="image"><img alt="xyz" src="//upload.wikimedia.org/wikipedia/en/thumb/b/bc/Wiki.png/104px-Wiki.png" width="104" height="120" /></a></div>
</div>
<div class="gallerytext">
<p>cap<b>t</b>ion</p>
</div>
</div>
</li>
</ul>

Expected:

<ul class="gallery">
<li class="gallerybox" style="width: 155px">
<div style="width: 155px">
<div class="thumb" style="width: 150px;">
<div style="margin:15px auto;"><a href="/wiki/File:Wiki.png" class="image"><img alt="x'''y'''z" src="//upload.wikimedia.org/wikipedia/en/thumb/b/bc/Wiki.png/104px-Wiki.png" width="104" height="120" /></a></div>
</div>
<div class="gallerytext">
<p>cap<b>t</b>ion</p>
</div>
</div>
</li>
</ul>


Version: 1.22.0
Severity: normal

Details

Related Objects

View Standalone Graph
This task is connected to more than 200 other tasks. Only direct parents and subtasks are shown here. Use View Standalone Graph to show more of the graph.

Event Timeline

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

Change 76341 had a related patch set uploaded by Liangent:
LanguageConverter fixes to eliminate parser test failures

https://gerrit.wikimedia.org/r/76341

Change 76341 had a related patch set uploaded (by Bartosz Dziewoński):
LanguageConverter fixes to eliminate parser test failures

https://gerrit.wikimedia.org/r/76341

Change 311849 had a related patch set uploaded (by C. Scott Ananian):
WIP: protect language converter markup in the preprocessor.

https://gerrit.wikimedia.org/r/311849

Change 327778 had a related patch set uploaded (by C. Scott Ananian):
Allow HTML tags in LanguageConverter output.

https://gerrit.wikimedia.org/r/327778

Change 327778 merged by jenkins-bot:
Allow HTML tags in LanguageConverter output.

https://gerrit.wikimedia.org/r/327778