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

Allow wildcards in whitelist attributes #1871

Open
wants to merge 11 commits into
base: master
Choose a base branch
from

Conversation

promiselaoliu
Copy link

Support validation on data attributes.

@promiselaoliu promiselaoliu changed the title Issue #499 Allow wildcards in whitelist attributes Issue #499 #1882 Allow wildcards in whitelist attributes Jan 10, 2023
Copy link
Owner

@jhy jhy left a comment

Choose a reason for hiding this comment

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

I thought this was going to be about wildcards, but it is framed around a new method for data- / custom "data" attributes. attributes. On review of the issue I still lean towards a wildcard match. Like 'data-' or 'ng-' etc. I think that will be more flexible and simpler to use than another method. It can be implemented in the isSafeAttribute method, doesn't need another data structure to retain them,

@jhy jhy linked an issue Jan 24, 2023 that may be closed by this pull request
@jhy jhy changed the title Issue #499 #1882 Allow wildcards in whitelist attributes Allow wildcards in whitelist attributes Jan 24, 2023
@promiselaoliu
Copy link
Author

promiselaoliu commented Feb 12, 2023

I thought this was going to be about wildcards, but it is framed around a new method for data- / custom "data" attributes. attributes. On review of the issue I still lean towards a wildcard match. Like 'data-' or 'ng-' etc. I think that will be more flexible and simpler to use than another method. It can be implemented in the isSafeAttribute method, doesn't need another data structure to retain them,

Fixed.
@jhy

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

Successfully merging this pull request may close these issues.

Allow wildcards in whitelist attributes
2 participants