Page MenuHomePhabricator

Query parameter will break if an Ampersand (&) is part of the page title
Open, Needs TriagePublic

Description

Hello Yaron!

I've noticed a bug with the formlink query parameter. It will break, if the value (in this case the PAGENAME) contains an ampersand. This is because ampersands are used to seperate the URL parameters.

{{#formlink:form=Person
  |link type=button
  |query string=Business[Works At]={{PAGENAME}}
}}

You can probably fix this by urlencoding the value of the query string before sending and urldecoding it when importing it from the query string. I've tryed to use the magic word {{urlencode:...}}, but since there is no urldecode on the import I'll get stuck with the encoded chars and a broken page link.

Best,
Simon

Event Timeline

Fannon assigned this task to Yaron_Koren.
Fannon raised the priority of this task from to Needs Triage.
Fannon updated the task description. (Show Details)
Fannon added subscribers: Fannon, planetenxin.

Yes, I've tryed it - but the urldecode afterwards does not seem to happen:

2016-02-19 09_32_38-Edit Person_ Person_Alexander Gesinn - msc - Firefox Developer Edition.png (302×1 px, 11 KB)

<includeonly>{{#formlink:form=Person
  |link type=button
  |link text={{int:SA Foundation Add}} {{int:SA Person Person}}
  |query string=Business[Works At]={{urlencode:{{PAGENAME}}}}
  |popup
}}</includeonly>

I'm using SF 3.3.2

Aklapper added a subscriber: Yaron_Koren.

This task has been assigned to the same task owner for more than two years. Resetting task assignee due to inactivity, to decrease task cookie-licking and to get a slightly more realistic overview of plans. Please feel free to assign this task to yourself again if you still realistically work or plan to work on this task - it would be welcome!

For tips how to manage individual work in Phabricator (noisy notifications, lists of task, etc.), see https://phabricator.wikimedia.org/T228575#6237124 for available options.
(For the records, two emails were sent to assignee addresses before resetting assignees. See T228575 for more info and for potential feedback. Thanks!)