Opened 6 years ago

Last modified 2 years ago

#16876 assigned defect

JsonRest store fails to encodeURIComponent() sort direction in URL

Reported by: joonas Owned by: dylan
Priority: undecided Milestone: 1.15
Component: Data Version: 1.8.3
Keywords: Cc:
Blocked By: Blocking:

Description

The sort direction, by default, is indicated with '-' or '+'.

+ is a sign that needs to be encodeURIComponent()'d.

Patch attached.

Attachments (1)

JsonRest.js.diff (557 bytes) - added by joonas 6 years ago.
Patch

Download all attachments as: .zip

Change History (6)

Changed 6 years ago by joonas

Attachment: JsonRest.js.diff added

Patch

comment:1 Changed 6 years ago by joonas

Oh, and just to be clear: the problem was that the server received my intention to "sort by name, ascending" ("+name") as " name" (again, + = space)

comment:2 Changed 6 years ago by freddefisk

Kind of a duplicate of #15047, although that ticket solved it by customizable ascending/descending prefixes. Maybe the prefix should still be url encoded, as proposed in your patch?

comment:3 Changed 6 years ago by joonas

Yes, I think that the deeper issue here is building an URL without escaping the parameter values.

Using custom asc/desc prefixes to get around the bug sounds a bit of a hack to me. :)

comment:4 Changed 3 years ago by dylan

Component: GeneralData
Milestone: tbd1.12
Owner: set to dylan
Status: newassigned

comment:5 Changed 2 years ago by dylan

Milestone: 1.131.15

Ticket planning... move current 1.13 tickets out to 1.15 to make it easier to move tickets into the 1.13 milestone.

Note: See TracTickets for help on using tickets.