https://bugzilla.wikimedia.org/show_bug.cgi?id=19144
Web browser: Mozilla Firefox 3.0.x
Summary: {{#if:}} inside external link causes the link to be
parsed wrongly
Product: MediaWiki extensions
Version: any
Platform: PC
OS/Version: Linux
Status: NEW
Severity: normal
Priority: Normal
Component: ParserFunctions
AssignedTo: [email protected]
ReportedBy: [email protected]
I have a template that is generating external links ([ ...])
If part of the link includes an {{#if:}} construct, some characters are not
parsed correctly, but actually terminate the link construct.
I have seen two different cases:
1. a '#' in the replacement text ends the link.
[http://somesite.com#anchor My site]
correctly shows 'My site', with a link to http://somesite.com#anchor
but
[http://somesite.com{{#if:anchor|#anchor}} My site]
expands to
* http://somesite.com
1. anchor My site]
as though it were
[http://somesite.com]
#anchor My site ]
(including treating the '#' as a numbered list item).
Using nowiki helps, but still gives a different wrong result:
[http://somesite.com{{#if:anchor|<nowiki>#</nowiki>anchor}} My site
expands as though it were
[http:somesite.com <nowiki>#</nowiki>anchor My site]
The workround I have is to put the # outside the #if:
[http://somesite.com#{{#if:anchor|anchor}} My site]
This works, but of course it always generates the # on the link.
2. a ':' has similar problems, but not quite so bad, presumably because it is
not so special to Mediawiki. The nowiki trick works here.
MW 1.13.2, ParseFunctions 1.1.1
--
Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
You are on the CC list for the bug.
_______________________________________________
Wikibugs-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l