Skip to content

Reports admin filter URL encoding issue #133

Description

@mfendeksilverstripe

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.

Metadata

Metadata

Assignees

No one assigned

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions