Skip to content

[Sanitizer] Should JS URL attribute removal be part of the configuration? #12686

Description

@noamr

What is the issue with the HTML Standard?

Currently, removal of JS URL attributes is done only in setHTML etc. ("safe" mode). See the last argument in the inner sanitize steps.

However, since this process is not part of the sanitizer config, it wouldn't happen when calling setHTMLUnsafe on a sanitizer that had unsafe options removed using removeUnsafe.

This makes this option somewhat inconsistent as it's a "configuration outside the configuration", and can create confusion as it means that removeUnsafe doesn't remove all the unsafe options.

Suggesting that instead of having this as an out-of-band boolean, it becomes a part of the configuration

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions