-
Notifications
You must be signed in to change notification settings - Fork 6
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
feat: add support for html 5 tags #96
Conversation
Adds support for the following HTML 5 tags with the `style` attribute: * `article` * `aside` * `details` * `footer` * `header` * `main` * `mark` * `nav` * `section` * `summary` * `time` Adds test case for sanitization of contents of `pre` tag. Also adds the `aria-label` and `aria-hidden` attributes to the `div` tag.
@@ -50,13 +50,13 @@ describe("Sanitizer", () => { | |||
|
|||
// Extending the defaults | |||
const sanitizer2 = new Sanitizer( | |||
{ allowCommentTag: false, whiteList: { blockquote: [] } }, | |||
{ allowCommentTag: false, whiteList: { blink: [] } }, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The test for extending the defaults was changed since we added blockquote
to the main whitelist.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, but description should include blockquote, code, and pre as well.
Good catch. Description has been updated. |
sorry Im late to the review, but I think this pr should have also included the css edits too? |
@CodeBarker I did not include those, no. I can take another pass at addressing those specifically. |
Adds support for the following HTML 5 tags with the
style
attribute:article
aside
details
footer
header
main
mark
nav
section
summary
time
Adds
pre
,code
, andblockquote
tags withstyle
attribute.Adds test case for sanitization of contents of
pre
tag.Also adds the
aria-label
andaria-hidden
attributes to thediv
tag.