Skip to content

Allow all the attribute for an allowed tag #332

@dingjiedanielyang

Description

@dingjiedanielyang

This issue proposes a feature that is desired

Background & Context

We are using Dompurify to sanitize our HTML document. We want to keep all the attribute of the and tag by configuring
var clean = DOMPurify.sanitize(dirty, {WHOLE_DOCUMENT: true,ADD_TAGS: ['meta','link']});

It seems that some attribute of these two elements are filtered out. Is there a way to handle it without using ADD_ATTR feature. The attribute we want to keep is safe in and , but may not safe in other elements. That is why we don't want to use ADD_ATTR feature.

Thanks

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