-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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
🐛Fix amp-inputmask attributes stripping in amp-mustache 0.2. #20515
🐛Fix amp-inputmask attributes stripping in amp-mustache 0.2. #20515
Conversation
'value', | ||
'mask-output', | ||
'mask', | ||
], |
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.
value
and mask
should already be allowed: https://github.com/cure53/DOMPurify/blob/master/src/attrs.js
Try it out by adding a simple test case in test-purifier.js.
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.
mask
looks like it's only allowed for svg, and this is for an input tag. I'll check the error messages to see what the issue with value
was.
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.
DOMPurify doesn't use tag-specific whitelists for attributes. We should add a unit test for this change in test-purifier.js anyways.
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.
Done. PTAL
* commit '39464270aa888000b7692e36f5b8eac302eab516': Enables layers in canary (ampproject#20512) 🏗 Show progress of `browserify` transform prior to running tests (ampproject#20573) 🐛Fix amp-inputmask attributes stripping in amp-mustache 0.2. (ampproject#20515) Clean up bindings after amp-list reset. (ampproject#20570) Fix amp-form server side rendering (ampproject#20511) 📖Add sidebar in stories documentation (ampproject#20385)
…ect#20515) * Fix amp-inputmask attributes stripping in amp-mustache 0.2. Update example * Only add the new attribute mask-output * Add test
And update example
@choumx was there any reason why the purifier didn't already allow
value
?