Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reports admin filter URL encoding issue #133

Open
mfendeksilverstripe opened this issue Nov 24, 2020 · 1 comment
Open

Reports admin filter URL encoding issue #133

mfendeksilverstripe opened this issue Nov 24, 2020 · 1 comment

Comments

@mfendeksilverstripe
Copy link
Contributor

mfendeksilverstripe commented Nov 24, 2020

Reports admin URL encoding issue

Affected version: 4.5.1

Reports have the capability to add form filters via the parameterFields() method. These fields will be shown via the Reports admin UI. The values of the filter fields are collected via JavaScript and appended to URL as GET params. This process applies url encoding. The form gets populated by these encoded values which has side effects.

Test scenario

This causes a problem with some characters. Example below shows what happens if string A B is used to filter.

Screen Shot 2020-11-24 at 2 22 48 PM

After clicking filter

Screen Shot 2020-11-24 at 2 22 57 PM

Expected result

A B filter value is retained

Actual result

A B gets transformed into A+B

Possible solution

Applying urldecode to Form population seems to do the trick.

@emteknetnz
Copy link
Member

emteknetnz commented Jan 10, 2021

I made an attempt (now closed) in #134

PR has a useful comment from Max about a more correct way to solve this

@emteknetnz emteknetnz assigned emteknetnz and unassigned emteknetnz Feb 3, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants