Last modified: 2010-05-15 15:38:54 UTC
An image caption containing a non-http external link (e.g. irc://, https://), of
any kind (free, labelled, bracketted), breaks - the old external link getting
parsed multiple times problem. The only reason http:// links *don't* break is
because there's a special case that temporarily masks them as http-noparse://.
Expanding this masking to all protocols should fix the problem. (Patch follows)
Created attachment 765 [details]
Patch to temporarily mask *all* external links inside image captions
This patch just replaces the http:// -> http-noparse:// mask with one based on
the $wgUrlProtocols regex; it uses UNIQ_PREFIX."NOPARSE" at the beginning so
that the protocol is effectively masked without having to insert text before
the colon (impossible using that regex).
Created attachment 766 [details]
tweaked version; mask all external links, but make sure not to double-mask them
Since this hasn't been committed yet, I'll just add a quick tweak: to avoid the
minor possibility of double-masking a URL somewhere, or some other hideous
confusion of that sort, match a "\b" at the beginning of the URL
Created attachment 778 [details]
patch to add a parsertest for this bug
Created attachment 779 [details]
url masking patch that doesn't choke the patch utility
[Oops - never manually edit a diff file, at least not without either knowing
what you're doing, or testing that it still works as a patch afterwards.
I've committed both the parsertest and the fix to CVS HEAD and the 1.5 branch.