Page MenuHomePhabricator

mw.uri.encode with WIKI unexpectedly encodes /
Closed, ResolvedPublic



mw.logObject(mw.uri.encode('Metallica/Kill+\'+Em+All', 'WIKI'))

Expected - behavior should be exactly as urlencode:


since mw.uri.encode doesn't work as expected one should bypass it and use frame:preprocess('{{urlencode:'..s..'|WIKI}}')

Event Timeline

eranroz created this task.Aug 26 2017, 9:15 AM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptAug 26 2017, 9:15 AM
eranroz updated the task description. (Show Details)Aug 26 2017, 9:42 AM

Change 374329 had a related patch set uploaded (by Anomie; owner: Anomie):
[mediawiki/extensions/Scribunto@master] Make mw.uri.encode 'WIKI' mode match core {{urlencode:}}

Change 374329 merged by jenkins-bot:
[mediawiki/extensions/Scribunto@master] Make mw.uri.encode 'WIKI' mode match core {{urlencode:}}

Anomie closed this task as Resolved.Aug 28 2017, 6:29 PM
Anomie claimed this task.
Anomie added a subscriber: Anomie.

This should be deployed to WMF wikis with 1.30.0-wmf.16, see for the schedule.

Aklapper removed a subscriber: Anomie.Oct 16 2020, 5:39 PM