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

fix: Do not double decode XML entities in filenames #364

Merged

Conversation

susnux
Copy link
Contributor

@susnux susnux commented Feb 4, 2024

The href property is already decoded by parseXML meaning all XML entities like & were decoded. The href just needs to be url decoded.

This prevents issues were files like a & b.txt were returned with the wrong name a & b.txt

Ref: https://datatracker.ietf.org/doc/html/rfc4918#section-8.3

The `href` property is already decoded by `parseXML` meaning all XML entities like `&` were decoded.
The href just needs to be url decoded.

This prevents issues were files like `a & b.txt` were returned with the wrong name `a & b.txt`

Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
@perry-mitchell
Copy link
Owner

Thanks @susnux ! Everything looks good here so I'll merge.

@perry-mitchell perry-mitchell merged commit bf3c79b into perry-mitchell:master Feb 5, 2024
6 checks passed
@perry-mitchell
Copy link
Owner

@susnux Released in 5.3.2

@susnux
Copy link
Contributor Author

susnux commented Feb 5, 2024

Thank you very much for the quick bugfix release! 🚀

@susnux susnux deleted the fix/xml-entities-file-names branch February 5, 2024 11:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

XML entities in filenames are not handled correctly
2 participants