Page MenuHomePhabricator

{{localurl}} used within a link fails to correctly escape the ampersand character
Closed, ResolvedPublic

Description

When using {{SERVER}}{{localurl:{{NAMESPACE}}:{{PAGENAME}}|action=edit}} as a
link, and the page name contains an ampersand, the generated link does not
escape the ampersand in the page title.

Testcases:

{{localurl:&|action=edit}} gives the expected output of
"/w/index.php?title=%26&action=edit"

{{SERVER}}{{localurl:&|action=edit}} is automatically converted into a
hyperlink (because of the leading http:// generated by {{SERVER}}) and gives the
incorrect output of "http://en.wikipedia.org/w/index.php?title=&&action=edit"


Version: 1.6.x
Severity: normal
OS: Linux
Platform: PC
URL: http://en.wikipedia.org/wiki/Wikipedia_talk:Proposed_deletion#.22Edit_this_page.22_not_working_properly

Details

Reference
bz5064

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 21 2014, 9:08 PM
bzimport added a project: MediaWiki-Parser.
bzimport set Reference to bz5064.
bzimport added a subscriber: Unknown Object (MLST).

This has nothing whatsoever to do with {{localurl}}.

  • This bug has been marked as a duplicate of 4781 ***