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

🐛Fix amp-inputmask attributes stripping in amp-mustache 0.2. #20515

Merged
merged 3 commits into from
Jan 29, 2019

Conversation

cvializ
Copy link
Contributor

@cvializ cvializ commented Jan 24, 2019

And update example

@choumx was there any reason why the purifier didn't already allow value?

'value',
'mask-output',
'mask',
],

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.

Copy link
Contributor Author

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.

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.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done. PTAL

@cvializ cvializ merged commit 1cf82ac into ampproject:master Jan 29, 2019
jsalgueiro added a commit to jsalgueiro/amphtml that referenced this pull request Jan 29, 2019
* 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)
@cvializ cvializ deleted the fix/amp-inputmask-template branch February 7, 2019 18:47
noranazmy pushed a commit to noranazmy/amphtml that referenced this pull request Mar 22, 2019
…ect#20515)

* Fix amp-inputmask attributes stripping in amp-mustache 0.2. Update example

* Only add the new attribute mask-output

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

Successfully merging this pull request may close these issues.

5 participants