Skip to content

Filtering Down Attributes #194

@jhechtf

Description

@jhechtf

I am using this in a place where I have to parse user-given content.

I am already aware that this library is not safe, I have already implemented safeguards to ensure that non-allowed elements are not presented.

But now I have a different scenario wherein I need to be able to safely allow certain elements (like a p tag) with certain attributes (style), and disallow any JS/React events.

I've tried using the replace setup, but how do i let the rest of the parser run without interferring, while also removing those unwanted / dangerous props?

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionFurther information is requested

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions