Page MenuHomePhabricator

urlencode magic word double encodes entities
Closed, ResolvedPublic

Description

Author: mwtoews

Description:
In the present version of Wikipedia (can't find version number!), the urlencode
string parser function double encodes. For example: "{{urlencode:<}}" results in
"%26lt%3B", when a correct result should be "%3". Here, the string is first
encoded into "&gt;", which then gets encoded into raw format, "&" into "%26" and
";" into "%3B".


Version: unspecified
Severity: normal

Details

Reference
bz9031

Event Timeline

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

robchur wrote:

This appears to be the result of encoding occurring further up the parse chain; the function itself is receiving "&lt;" as input.

mwtoews wrote:

I have noticed that this bug has been fixed (in version 1.13alpha (r34282)).

Thanks!