Page MenuHomePhabricator

colons in image markup being parsed as external links
Closed, DeclinedPublic

Description

Author: uqcqnzadyc

Description:

When I enter this in mediawiki (german):

Test1
[[Bild:Test.JPG|thumb]]

Test2

I get this output:

<!-- start content -->

	    <p>Test1

</p>
<div class="thumb tright"><div style="width<a href=":182px class='external'
rel="nofollow">:182px</a>;"><a href="/wiki/index.php/Bild<a href=":Test.JPG
class='external' rel="nofollow">:Test.JPG</a>" class="internal" title=""><img
src="/wiki/images/thumb/0/05/180px-Test.JPG" alt="" width="180" height="120"
longdesc="/wiki/index.php/Bild<a href=":Test.JPG class='external'
rel="nofollow">:Test.JPG</a>" /></a> <div class="thumbcaption" ><div
class="magnify" style="float<a href=":right class='external'
rel="nofollow">:right</a>"><a href="/wiki/index.php/Bild<a href=":Test.JPG
class='external' rel="nofollow">:Test.JPG</a>" class="internal"
title="vergrößern"><img src="/wiki/skins/common/images/magnify-clip.png"
width="15" height="11" alt="vergrößern" /></a></div></div></div></div>

<p>Test2
</p><div class="printfooter">
Von "<a
href="http://xyz.de/wiki/index.php/Seite2">http://xyz.de/wiki/index.php/Seite2</a>"</div>

	    	    <!-- end content -->

Theese additional colons are destroying the layout


Version: 1.4.x
Severity: normal
OS: Windows XP
Platform: PC

Details

Reference
bz3103

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 21 2014, 8:45 PM
bzimport set Reference to bz3103.
bzimport added a subscriber: Unknown Object (MLST).

rowan.collins wrote:

Weuh! Your wiki appears to be interpretting every occurrence of ":" as though it
were an external link - seemingly as though ":" were a valid 'protocol' prefix,
like "http://", "mailto:", etc. Thus "width:182px" becomes "width<a
href=":182px">:182px</a>" (with some extra floweryness), and so on wherever ":"
appears. (The mismatched "s may be your browser trying to make sense of the HTML
as it processes it)

Have you made any changes to the code, or made any "unusual" changes in
LocalSettings.php? Can you replicate this problem on any other wiki? What
happens if you just type "Bild:Test.JPG", or for that matter ":test"? (i.e. does
this happen only within the image markup, or to the wikitext generally?)

rowan.collins wrote:

I'm going to resolve this bug (as "WORKSFORME") on the grounds that without
further details of the circumstances in which it occurs, there's really not much
we can do - and since you used a throwaway e-mail address, I'm not convinced
that such details are forthcoming. If you do actually come back and read these
replies, feel free to reopen the bug with more details, and my apologies if this
seems impatient of me.