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: No longer serialize any namespaces with an empty URI #244

Merged
merged 2 commits into from Jun 9, 2021

Conversation

karfau
Copy link
Member

@karfau karfau commented Jun 4, 2021

fixes #243

I moved to tests and the check originally added by @pdecat to a more appropriate place and commented there.

Note: There is no case missing by removing the check for empty prefix in the condition, since

prefix uri !prefix && !uri !uri
empty empty true true
empty set false false
set empty false true
set set false false

so we just additionally cover the missing case

@karfau karfau requested a review from brodybits June 4, 2021 21:55
@karfau karfau added this to the next release milestone Jun 4, 2021
@pdecat
Copy link
Contributor

pdecat commented Jun 5, 2021

Hi @karfau, much better than the previous fix, thanks!

Can confirm it works fine with my usecase.

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.

Serializing DOM that uses undefined namespace prefixes in attributes produces invalid XML
2 participants