Skip to content

Don't sanitize custom HTML elements #2682

@salty-horse

Description

@salty-horse

Is your feature request related to a problem? Please describe.
Many modern HTML5 web pages use custom element names.
For example, reactormag.com uses <article-content>.

These are removed (keeping the contents) by WebToEpub's sanitize() function, specifically by DOMPurify.sanitize.

In this particular case, I can match against one of the element's children, which are not removed, but then I need to specify elements to remove.

Those custom elements names are not a security risk - they're just custom names, and in standard use. Is there a specific reason they are removed?

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