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: dc:source element caused a NullPointerException #1523

Merged
merged 1 commit into from
Jul 6, 2023

Conversation

rdeltour
Copy link
Member

@rdeltour rdeltour commented Jul 6, 2023

The checks related to the HTML source element were run regardless of the element namespace, and with lack of protective coding. This caused an NPE when the markup contained dc:source elements.

This commit fixes the situation by:

  • only applying OPSHandler30 checks for the elements in the target namespace
  • returning early when the source element preconditions aren't met, as these preconditions are checked by schema

Fix #1514

The checks related to the HTML `source` element were run regardless of
the element namespace, and with lack of protective coding. This caused
an NPE when the markup contained `dc:source` elements.

This commit fixes the situation by:
- only applying `OPSHandler30` checks for the elements in the target
  namespace
- returning early when the `source` element preconditions aren't met,
  as these preconditions are checked by schema

Fix #1514
@rdeltour rdeltour added this to the Next maintenance release milestone Jul 6, 2023
@rdeltour rdeltour self-assigned this Jul 6, 2023
@rdeltour rdeltour merged commit c15e4ea into main Jul 6, 2023
@rdeltour rdeltour deleted the fix/1514/dc-source branch July 6, 2023 22:03
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.

NullPointerException on EPUB containing SVG image with DublinCore metadata(?)
1 participant