Page MenuHomePhabricator

SF query string not passing values containing apostrophes properly
Closed, ResolvedPublicBUG REPORT

Description

Author: mitchell_neill

Description:
Hi.

I'm running SMW bundle 1.18 on ME 1.19.3.

I have the following:

{{#formlink:form=Subsection Form|link text=Add a Subsection|link type=button|query string=Subsection[Parent]={{{Page Title|}}}}}

If Page Title contains an apostrophe, the value is truncated at the apostrophe.

Example. If Page Title is "What's New" the field in the form just contains "What"

I remember this problem a while back with SMW 1.5 and SF 2.0 and it was fixed then. So perhaps this is a regression.

Any ideas for a fix or workaround?

Thanks.


Version: unspecified
Severity: normal

Details

Reference
bz44104

Event Timeline

bzimport raised the priority of this task from to Needs Triage.Nov 22 2014, 1:24 AM
bzimport set Reference to bz44104.

mitchell_neill wrote:

Fix to this of course would be to urlencode the value when passing it and then urldecoding it.

mitchell_neill wrote:

Hmm. It also cannot cope with the & character. So you can pass field values such as "Hours & minutes". Ampersands are even more common than apostrophes, so this is becoming quite a painful limitation.

mitchell_neill wrote:

Ditto for + char. So you cannot pass field values such as "Age 21+".

gary wrote:

I am getting this too. I have a template that defines a book. In this template I have a form link to allow people to submit a review. The formlink is shown below.

{{#formlink:form=Book Entry|link text=Add a Book|link
type=button|query string=Book[Title]={{{Page Title|}}}}}

If the book's Page Title contains ' & + £ etc then the Book[Title] field is chopped off at the affected character.

So books with names like the following do not work
Get an A+ in Math
Pride & Prejudice
Schindler's List

These characters are very common, so this should work ideally.

Aklapper triaged this task as Low priority.Feb 4 2022, 8:07 PM
Aklapper changed the subtype of this task from "Task" to "Bug Report".
Yaron_Koren claimed this task.
Yaron_Koren subscribed.

This seems to have been fixed at some point.