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

ARIA related attributes are dropped by sanitizer #399

Open
tushuhei opened this issue Sep 3, 2018 · 0 comments
Open

ARIA related attributes are dropped by sanitizer #399

tushuhei opened this issue Sep 3, 2018 · 0 comments

Comments

@tushuhei
Copy link

tushuhei commented Sep 3, 2018

When I serialize a HTML document including elements with ARIA related attributes, serialize method drops them off as a result of sanitization.

import html5lib
doc = '<div id="foo">the description</div><span aria-describedby="foo">bar</span>'
print(html5lib.serialize(html5lib.parseFragment(doc),
                         sanitize=True, quote_attr_values='always'))
# <div id="foo">the description</div><span>bar</span>

ARIA related attributes are not dangerous for my understanding, so serialize method should keep them even if the parameter sanitize is True.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants