syntax-tree / hast-util-sanitize

utility to sanitize hast nodes
https://unifiedjs.com
MIT License
48 stars 20 forks source link

Add support for regexes to allow property values #26

Closed aprendendofelipe closed 1 year ago

aprendendofelipe commented 1 year ago

Initial checklist

Description of changes

Sometimes it can be unsafe to allow any values for a property while there may be so many safe values that you would need to pass a very large list.

I propose to also accept RegEx in the list of allowed property values.

aprendendofelipe commented 1 year ago

Good idea. Some ideas on how to improve it. Also, CI is failing, seems to be due to the changes, or was it already failing locally for you?

It was giving error because of the typing of handleTagName, so I ignored the errors and didn't catch the new errors. Now it's passing.

github-actions[bot] commented 1 year ago

Hi! This was closed. Team: If this was merged, please describe when this is likely to be released. Otherwise, please add one of the no/* labels.

wooorm commented 1 year ago

Thanks, released!