Page MenuHomePhabricator

Template misses its parameter when containing a link with "=" (equal sign) character in the URL, or HTML attributes
Open, LowPublic

Description

Templates using unnamed parameters break when those parameters contain:

  • An external link that has an equal sign (example: http://example.com/?p=1)
  • An HTML attribute (example: <span title="Tooltip">Text</span>)

This is because the parser interprets the equal sign as the separator between the parameter name and the value, taking precedence over those elements.

The current workaround is to use index-named parameters, changing {{template|param1|param2}} to {{template|1=param1|2=param2}}


Original report:

See http://test.wikipedia.org/wiki/Template:Warn/tests and its source. It appears that when the parameter contains a link with "=" character in its URL, the parmater is totally missed! However, if "1=" is added to the beginning of the parameter to make the template understand it, things are better.


Missing comments

All comments on this task are missing due to T284397. Comments before 2015 can be read on the old bugzilla instance

Details

Reference
bz14235

Event Timeline

bzimport raised the priority of this task from to Low.Nov 21 2014, 10:10 PM
bzimport set Reference to bz14235.
bzimport added a subscriber: Unknown Object (MLST).
Ciencia_Al_Poder renamed this task from Template misses its parameter when containing a link with "=" character in the URL to Template misses its parameter when containing a link with "=" (equal sign) character in the URL, or HTML attributes.Jan 24 2015, 12:08 PM
Ciencia_Al_Poder updated the task description. (Show Details)
Ciencia_Al_Poder set Security to None.
Ciencia_Al_Poder removed a subscriber: Unknown Object (MLST).