Skip to content

All attributes are set to lowercase #476

@abierbaum

Description

@abierbaum

Background & Context

It appears that DOMPurify converts all attributes in sanitized output to lowercase. I am using custom web components (Angular-based) that rely upon attributes that are case sensitive. I can't find a way to work around this.

I had to override the ALLOWED_TAGS to allow my elements through and then I used a hook on 'uponSanitizeAttribute' to forceKeepAttr to allow all my attributes through. But the case of the attribute is still changed.

Is there a way to work around this?

Bug

Input

<my-component testAttrib="test"></my-component>

Given output

<my-component testattrib="test"></my-component>

Expected output

<my-component testAttrib="test"></my-component>

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