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 xml:base handling in DecodeElement #11

Merged
merged 2 commits into from
Feb 25, 2024
Merged

Fix xml:base handling in DecodeElement #11

merged 2 commits into from
Feb 25, 2024

Conversation

cristoper
Copy link
Contributor

This PR includes two changes:

  • An improved test that fails because the current DecodeElement pops the BaseStack even if the current element did not push a base to it
  • A fix that only pops the BaseStack when the current element contains an xml:base attribute

For some context see: mmcdole/gofeed#210

This fixes a bug with xml:base tracking where calling `DecodeElement` on
an element with no xml:base attribute would erroneously pop the
BaseStack resulting in the wrong xml:base for future elements.
@mmcdole mmcdole merged commit 90a1bf2 into mmcdole:master Feb 25, 2024
@cristoper cristoper deleted the fix-base-decode branch February 29, 2024 02:33
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.

2 participants