Page MenuHomePhabricator

Strange urlencode error
Open, LowPublic



I'm not sure where this stems from. In fact Im not sure if it's mediawiki, parser functions or just a "you shouldn't be trying to do that".

Basically I wanted a system message to include a link to the delete log of the relevant article. The pagename is provided in "$1", and I wanted the system message to include "[{{urlencode:$1}} $1]" as a link. Poor coding perhaps, but as the message allowed piped links I had hopes it might work.

The revision of the system message is here:

I then clicked the link for an oversighted revision to see if it worked.

The piping worked, as in, the resulting error gave the correct (piped) display name. But the URL it hyperlinked to was

Something's not quite right there....

Version: unspecified
Severity: normal



Event Timeline

bzimport raised the priority of this task from to Low.Nov 21 2014, 10:37 PM
bzimport added a project: ParserFunctions.
bzimport set Reference to bz18794.
bzimport added a subscriber: Unknown Object (MLST).

<TimStarling> you can't urlencode a URL
<TimStarling> oh right, you're skipping the rest of the URL
<TimStarling> good fun
<TimStarling> presumably the article name is wrapped in <nowiki>
<TimStarling> I seem to remember that was done in a few messages wrote:

Noting the same error occurs for:
[{{fullurl:Special:Log|type=delete&page={{urlencode:$1}}}} blah]
as well.

The piped text is fine, the hyperlink points to: wrote:

{{fullurl:Special:Log|type=delete&page=$1}} didn't work either

T24555 is a related, more general form of this issue, that contains more info.