Skip to content

Add option to strip tags from sanitizer #27

Open
@gsnedders

Description

@gsnedders

To quote @rubys from http://code.google.com/p/html5lib/issues/detail?id=62:

My inclination is to flip this entirely. It seems inconsistent that evil CSS is
stripped, and unknown attributes are stripped, but unknown elements are escaped, and
escaped poorly (what happens if an attribute for this element has a double quote in it?).

I mean, who wants to see <object> tags. It is bad enough that YouTube videos are
stripped, but rubbing salt in the would by showing a bunch of gibberish seems
entirely unnecessary.

I'd suggest a expose_disallowed_elements=False class variable which can be set to
True if somebody really wants the current behavior.

With #26 this has become possible, but a nicer API would be better.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions