Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
❓ Type of change
📚 Description
I'm building a blog nuxt app and using the sitemap module. While reading the sitemap, I recognized that the URLs containing umlauts like ä, ö, ü, ß and also á, à etc. are invalid. They get doubly encoded. For example:
/Bücher
should be encoded to/B%C3%BCcher
, but now it is/B%25C3%25BCcher
. The latter value is generated, when the first value (/Bücher
) get URL encoded twice, sodecodeURI(decodeURI('B%25C3%25BCcher'))
will lead to/Bücher
again.This PR is addressing this issue, also providing a test, to show that it really only gets encoded once. For this, a little helper function was introduced (
isEncoded
) to check if a string is already encoded or not.I didn't add a test showing the issue, only one for the solution..
The failing eslint checks seems unrelated to the changes..