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

132 contentbaseurl not working with hash sign #133

Merged
merged 2 commits into from
Jan 12, 2024

Conversation

TesteurManiak
Copy link
Member

Fix #132

Uri.parse consider the # as a fragment marker, making it unreliable for urls containing #, as a workaround I'm replacing this character with a placeholder to manipulate the Uri correctly before restoring it when it's converted back to a String. (I'm open to a better way to do this if anybody has an idea)

I've added a non regression test to verify the fix under matomo_action_test.dart.

@TesteurManiak TesteurManiak added bug Something isn't working priority-high High priority issues or PR labels Jan 11, 2024
@TesteurManiak TesteurManiak self-assigned this Jan 11, 2024
@TesteurManiak TesteurManiak linked an issue Jan 11, 2024 that may be closed by this pull request
Copy link
Member

@Pierre-Monier Pierre-Monier left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, I'm just wondering why the Uri.parse method is acting this way, I'm pretty sure that it is not a bug but a desired behavior

@TesteurManiak
Copy link
Member Author

LGTM, I'm just wondering why the Uri.parse method is acting this way, I'm pretty sure that it is not a bug but a desired behavior

I agree, a "real" fix to this issue would probably be to replace String contentBase to Uri contentBase to manipulate uris directly instead of parsing back and forth. We could consider refactoring this as part of the next major release 🤔

@TesteurManiak TesteurManiak merged commit b9d5c3e into main Jan 12, 2024
2 checks passed
@TesteurManiak TesteurManiak deleted the 132-contentbaseurl-not-working-with-hash-sign branch January 12, 2024 10:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working priority-high High priority issues or PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

contentBaseUrl not working with hash sign.
2 participants