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

Parser for XML names is too lenient #188

Open
k0ral opened this issue Jun 20, 2023 · 0 comments
Open

Parser for XML names is too lenient #188

k0ral opened this issue Jun 20, 2023 · 0 comments

Comments

@k0ral
Copy link
Collaborator

k0ral commented Jun 20, 2023

Follow-up of #187 .

The parseIdent/parseName functions are supposed to match the Name XML specification:

[4]   	NameStartChar	   ::=   	":" | [A-Z] | "_" | [a-z] | [#xC0-#xD6] | [#xD8-#xF6] | [#xF8-#x2FF] | [#x370-#x37D] | [#x37F-#x1FFF] | [#x200C-#x200D] | [#x2070-#x218F] | [#x2C00-#x2FEF] | [#x3001-#xD7FF] | [#xF900-#xFDCF] | [#xFDF0-#xFFFD] | [#x10000-#xEFFFF]
[4a]   	NameChar	   ::=   	NameStartChar | "-" | "." | [0-9] | #xB7 | [#x0300-#x036F] | [#x203F-#x2040]
[5]   	Name	           ::=   	NameStartChar (NameChar)*

This specification allows for a very limited set of characters, yet the current implementation of parseIdent is much more permissive. This issue is about aligning the implementation with the XML specification.

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

No branches or pull requests

1 participant