fix: handling of rdf:HTML
literals by aucampia · Pull Request #2490 · RDFLib/rdflib (original) (raw)
Summary of changes
Previously, if without html5lib
installed, literals withrdf:HTML
datatypes were treated as
ill-typed, even if they were not ill-typed.
With this change, if html5lib
is not installed, literals with the rdf:HTML
datatype will not be treated as ill-typed, and will have Null
as their ill_typed
attribute value, which means that it is unknown whether they are ill-typed or not.
This change also fixes the mapping from rdf:HTML
literal values to lexical forms.
Other changes:
- Add tests for
rdflib.NORMALIZE_LITERALS
to ensure it behaves correctly.
Related issues:
Checklist
- Checked that there aren't other open pull requests for
the same change. - Checked that all tests and type checking passes.
- Considered granting push permissions to the PR branch,
so maintainers can fix minor issues and keep your PR up to date.