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: Escape < when serializing attribute values #199

Merged
merged 2 commits into from Mar 14, 2021

Conversation

karfau
Copy link
Member

@karfau karfau commented Mar 13, 2021

to produce well formed XML.

Well-formedness constraint: No < in Attribute Values
The replacement text of any entity referred to directly or indirectly in an attribute value must not contain a <.

https://www.w3.org/TR/xml/#CleanAttrVals
https://www.w3.org/TR/xml/#NT-AttValue

fixes #198

to produce well formed XML.

> Well-formedness constraint: No `<` in Attribute Values
> The replacement text of any entity referred to directly or indirectly in an attribute value must not contain a `<`.

https://www.w3.org/TR/xml/#CleanAttrVals
https://www.w3.org/TR/xml/#NT-AttValue

fixes xmldom#198
@karfau karfau added xml:not well-formed https://www.w3.org/TR/xml11/#dt-wellformed spec:XML https://www.w3.org/TR/xml11/ labels Mar 13, 2021
@karfau karfau requested a review from brodybits March 13, 2021 00:37
@karfau karfau self-assigned this Mar 13, 2021
@karfau karfau added this to the 0.6.0 milestone Mar 13, 2021
lib/dom.js Outdated Show resolved Hide resolved
Co-authored-by: Chris Brody <chris.brody+brodybits@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
spec:XML https://www.w3.org/TR/xml11/ xml:not well-formed https://www.w3.org/TR/xml11/#dt-wellformed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

'<' and '>' are not escaped in attribute values
2 participants