Author: rowan.collins
Description:
This was originally entered as bug 1033 comment 2, but I think it is actually a
seperate issue, with a different effect (an image with an image in its caption
is accepted as such by the parser, but the HTML produced is mangled).
It's hard to work out exactly what's being produced because of things like
'tidy' going round closing tags, but it looks like there's something wrong with
the order in which things are being escaped and/or removed from 'alt' and
'title' attributes, so that the HTML image markup for the inner image is being
inserted into those attributes. The lines in Skin::make{Image|Thumb}LinkObj()
beginning with
$alt = preg_replace( '/<[^>]*>/', '', $alt );
should cover this, leading me to suspect that the actual link-parsing is
happening in the wrong order (e.g. "...[[Image:...]]..." being replaced with
HTML when it's already in the attributes) , but I can't see anything wrong with
Parser::replaceInternalLinks() at a glance.
I'm CCing Wil Mahan on this, because we hacked the relevant bits of
replaceInternalLinks() around a lot between us (see bug 637), so he might have
some thoughts.
Version: 1.4.x
Severity: major
URL: http://en.wikipedia.org/wiki/Flag_of_Afghanistan