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

[Vue] make sure spaces are encoded as %20 in URLs since some parts of matomo do not decode + properly #19299

Merged
merged 1 commit into from Jun 1, 2022

Conversation

diosmosis
Copy link
Member

Description:

The Vue code uses $.param() to stringify query params (primarily to handle nested arrays in URLs that some parts of matomo expect). This function uses '+' to encode spaces, which appears to cause some issues in other places of matomo. For example, in the Vue migration for UsersFlow, highlighting a page title w/ a space in it will display '+' in the popup title because '+' is sent as the rowLabel parameter (see the relevant PR for screenshots). The angularjs code constructs the URL w/ encodeURIComponent directly, which uses %20. This seems to work in the popup title.

Fixed in this PR by changing '+' to '%20' manually after constructing a query string.

Review

@diosmosis diosmosis added the Needs Review PRs that need a code review label May 31, 2022
@diosmosis diosmosis added this to the 4.11.0 milestone May 31, 2022
@diosmosis diosmosis merged commit 9d4e0ed into 4.x-dev Jun 1, 2022
@diosmosis diosmosis deleted the vue-space-encoding branch June 1, 2022 05:20
@justinvelluppillai justinvelluppillai added not-in-changelog For issues or pull requests that should not be included in our release changelog on matomo.org. and removed Needs Review PRs that need a code review labels Jul 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
not-in-changelog For issues or pull requests that should not be included in our release changelog on matomo.org.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants