Skip to content

Fix #47531: No way of removing redundant xmlns: declarations #12542

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

Closed
wants to merge 1 commit into from

Conversation

nielsdos
Copy link
Member

Now it's possible via removeAttribute("xmlns:prefix"). It was not possible to reuse a libxml2 function to reconcile because it does not align with DOM behaviour.

Now it's possible via removeAttribute("xmlns:prefix").
It was not possible to reuse a libxml2 function to reconcile because it
does not align with DOM behaviour.
Copy link
Member

@Girgias Girgias left a comment

Choose a reason for hiding this comment

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

This looks sensible to me, maybe this should land in 8.3?

return;
}
worklist_capacity = worklist_capacity * 3 / 2;
worklist = erealloc(worklist, sizeof(dom_deep_ns_redef_item) * worklist_capacity);
Copy link
Member

Choose a reason for hiding this comment

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

Maybe use safe_erealloc() instead?

Copy link
Member Author

Choose a reason for hiding this comment

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

This looks sensible to me, maybe this should land in 8.3?

Probably. Could be landed in even lower versions as this is a proper bugfix, but I don't dare to do that because of reasons you know...

Maybe use safe_erealloc() instead?

I have to check for overflow of doing *3/2 already, so I folded the overflow check for sizeof(dom_deep_ns_redef_item) * worklist_capacity into that one already. I therefore don't think it's necessary to use safe_erealloc.

Copy link
Member

Choose a reason for hiding this comment

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

ACK for the realloc.

8.3 should be safe as it hasn't been "properly" released yet IMHO.

@nielsdos nielsdos closed this in f9a2496 Oct 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants