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

Attributes are not escaped #32

Open
sternenseemann opened this issue Jan 15, 2021 · 1 comment
Open

Attributes are not escaped #32

sternenseemann opened this issue Jan 15, 2021 · 1 comment

Comments

@sternenseemann
Copy link

sternenseemann commented Jan 15, 2021

Consider for example:

(who:htm
  (:input :type "text" :name "title" :value "My cat's birthday"))

; Renders <input type='text' name='title' value='My cat's birthday' />

This would break since ' is not escaped to &apos; as required by the XML spec. I think for attributes it generally makes sense to always use escape-string-minimal, since I don't see a situation where you'd want to be able to inject arbitrary strings into the tags attribute list.

I guess this can't really be changed now without breaking a lot of existing code depending on who already escaping its attributes, but a setting to change this behavior would be nice.

@stassats
Copy link
Member

escape-string-minimal doesn't actually escape #\'

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