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

[Bug] Permalink: encode layers style before hash comparison #4894

Merged
merged 1 commit into from
Oct 23, 2024

Conversation

mind84
Copy link
Contributor

@mind84 mind84 commented Oct 21, 2024

Plain comparison between window.location.hash and hash stored in Permalink _hash property

https://github.com/3liz/lizmap-web-client/blob/7bb076d4811fbf4f60c68213dcc1e95116f00f02/assets/src/modules/Permalink.js#L42C21-L42C55

does not work if a layer style contains spaces or other "special" chars.

If the hash comparison fails, the hash change could be triggered over and over again. This could also be enforced by the fact that the extension permalink parameter is converted in EPSG:4326 from project CRS and converted again to project CRS to set the map extension. In this conversion process, the original coordinates stored in the permalink may be transformed due to rounding

Backport to 3.8

Funded by Faunalia

@github-actions github-actions bot added this to the 3.10.0 milestone Oct 21, 2024
@Gustry Gustry added sponsored development This development has been funded javascript Pull requests that update Javascript code backport release_3_8 backport release_3_9 run end2end If the PR must run end2end tests or not labels Oct 21, 2024
Copy link
Collaborator

@rldhont rldhont left a comment

Choose a reason for hiding this comment

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

Thanks, backport 3.7 needed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport release_3_7 backport release_3_8 backport release_3_9 javascript Pull requests that update Javascript code run end2end If the PR must run end2end tests or not sponsored development This development has been funded
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants