Skip to content

Can I use the pre-processor to remove elements from the html? #359

@kglickman

Description

@kglickman

I have some html like this:

<div>
    <div style="display: none">
        <span>some text that shouldn't show</text>
     </div>
</div>

The sanitizer changes this code to remove the style="display: none" but leaves the rest of the html intact. This has the opposite affect to what we want.

Instead, I would like to pre-process the html to remove the entire div (and it's inner span). Is there a way to do this with the pre-processor? I know this isn't generally possible with SAX parsing but since this tool removes elements as part of it's base functionality, I thought there might be a way.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions