Repository navigation
oxrdfxml: accept single-quoted <!ENTITY> values - #2023
Merged
Tpt merged 1 commit intoNov 5, 2026
Merged
Conversation
XML 1.0 EntityValue allows both quote characters, but the DOCTYPE entity extraction only accepted double quotes, so documents like the W3C OWL 2 test export failed to parse. Fixes oxigraph#1998
Merging this PR will degrade performance by 9.86%1 warning
Warning Please fix the performance issues or acknowledge them on CodSpeed. Performance Changes
Tip Investigate this regression by commenting Comparing |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The DOCTYPE entity extraction only accepted
"..."values, but XML 1.0EntityValueallows'...'too. So files like the W3C OWL 2 test export (<!ENTITY rdf 'http://...'>) failed with "<!ENTITY values should be enclosed in double quotes".Now the parser takes whichever quote opens the value and reads up to the matching one, so
'say "hi"'and"it's"both work. I added a parser testsuite case covering single quotes plus each quote char inside the other kind.Tested with
cargo test -p oxigraph-testsuite --test oxigraph(the new case fails without the change) andcargo test -p oxrdfxml --all-features.Fixes #1998