Skip to content

svg elements that not contained in <svg> been removed after 2.2.6 #533

@NateScarlet

Description

@NateScarlet

This issue proposes a bug which...

Background & Context

I use DOMPurify to sanitize innerHTML of <g> element

Bug

Input

DOMPurify.sanitize('<polyline points="0 0"></polyline>', { USE_PROFILES: { svg: true } })

Given output

2.2.4: <polyline points="0 0"></polyline>

2.2.6: empty string

Expected output

same as 2.2.4

maybe related to #495, but i can not find a option to specify root namespace.

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