Page MenuHomePhabricator

Bad iteraction between image captions and Cite
Closed, ResolvedPublic

Description

When a <ref> is found within an image's caption, the result is a confusing
jumble, including HTML code showing up, and HTML code within the title= and alt=
attributes. I found the problem live at [[spyware#Routes of infection]].

To reproduce:

[[Image:Example.jpg|thumb|Test.<ref>true</ref>]]
<references/>

The resulting output is:

<div class="thumb tright">
<div style="width:252px;"><a href="/wiki/Image:Example.jpg" title="Test.&lt;sup
id=" class="reference"></a><a href="#_note-0" title="">[1]</a>"&gt;<img
src="http://upload.wikimedia.org/wikipedia/en/thumb/a/a9/Example.jpg/250px-Example.jpg"
alt="Test.&lt;sup id=" class="reference" /><a href="#_note-0" title="">[1]</a>"
width="250" height="246" longdesc="/wiki/Image:Example.jpg" /&gt;
<div class="thumbcaption">
<div class="magnify" style="float:right"><a href="/wiki/Image:Example.jpg"
class="internal" title="Enlarge"><img
src="/skins-1.5/common/images/magnify-clip.png" width="15" height="11"
alt="Enlarge" /></a></div>
Test.<sup id="_ref-0" class="reference"><a href="#_note-0"
title="">[1]</a></sup></div>
</div>
</div>
<ol class="references">
<li id="_note-0"><b><a href="#_ref-0" title="">↑</a></b> true</li>
</ol>


Version: unspecified
Severity: normal
OS: Linux
Platform: PC
URL: http://en.wikipedia.org/wiki/User:CesarB/Testcases/5139

Details

Reference
bz5139

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 21 2014, 9:08 PM
bzimport added a project: Cite.
bzimport set Reference to bz5139.
bzimport added a subscriber: Unknown Object (MLST).

Live testcase at [[User:CesarB/Testcases/5139]].

Seems to have been fixed silently; the testcase now returns the expected result.