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

XML tags not validated according to usual rules for NCName #12

Open
t0mpr1c3 opened this issue Mar 3, 2023 · 3 comments
Open

XML tags not validated according to usual rules for NCName #12

t0mpr1c3 opened this issue Mar 3, 2023 · 3 comments

Comments

@t0mpr1c3
Copy link
Contributor

t0mpr1c3 commented Mar 3, 2023

Symbol to string conversion in srl:sxml->xml does not escape XML characters. Nor does string parsing in ssax:xml->sxml recognise escaped characters.

(require sxml) 
(srl:sxml->xml '(number->string "2")) ;; '>' not escaped...
(ssax:xml->sxml (open-input-string (srl:sxml->xml '(number->string "2"))) null) ;; ... so this fails
(ssax:xml->sxml (open-input-string "<number-&gt;string>2</number-&gt;string>") null) ;; but this also fails
@jbclements
Copy link
Owner

Interesting. Yes, it seems to me that sxml->xml should do validation of the NCName production given in https://www.w3.org/TR/REC-xml/#NT-Name . It seems like the kind of thing that Oleg would have gotten right, though, so I think I should do some digging before agreeing that this is a bug.

@t0mpr1c3
Copy link
Contributor Author

t0mpr1c3 commented Mar 3, 2023

It seems like the kind of thing that Oleg would have gotten right

Yes

@t0mpr1c3
Copy link
Contributor Author

Should this at least be documented?

@t0mpr1c3 t0mpr1c3 changed the title XML escape characters not parsed correctly XML tags not validated according to usual rules for NCName Oct 28, 2023
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

2 participants