-
Notifications
You must be signed in to change notification settings - Fork 628
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
'href' tag is getting blanked on parse if there's no protocol #118
Comments
Also, relative href targets starting with |
Hey @deyhle, it looks like the functionality for custom attribute filters is actually there, it's just not documented well. The relevant docs can be found here: https://github.com/Nfinished/js-xss#customize-the-handler-function-for-attributes-not-in-the-whitelist Note that you'll need to make sure the attribute you're filtering for isn't in the whitelist, or your custom function won't fire. I've included my config with custom
Let me know if you have any questions! |
Thank you! It clearly can be fixed with a custom filter function. |
@deyhle the I will translate all the comments to English soon. Thank you for your support. |
When
href
is whitelisted for anchor tags, I see the following behavior.<a href="https://www.google.com">google</a>
resolves to
<a href="https://www.google.com">google</a>
but
<a href="www.google.com">google</a>
resolves to
<a href>google</a>
Is this a bug or a feature? My config options are below.
The text was updated successfully, but these errors were encountered: