Skip to content

sanitize should use a whitelist, not a blacklist #3

@feross

Description

@feross

It's a lot easier, safer, and future-proof to specify just the tags that you want to allow, instead of everything to disallow.

For example, 'onclick', 'onerror', 'onhover', 'onmouseover'... are there other attributes I'm missing? Does Gecko/Webkit/Blink have other proprietary events I need to blacklist to protect users of those browsers?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions