Skip to content

sanitize_css sort of ignores allowed_css_properties #317

Open
@willkg

Description

@willkg

elif prop.split('-')[0].lower() in ['background', 'border', 'margin',

That elif section essentially means that those four style properties get allowed regardless of allowed_css_properties value.

For example, this text:

<p style="color: red; float: left; padding: 1em;">blah</p>

with this allowed_css_properties:

['color']

gives this:

<p style="color: red; padding: 1em;">blah</p>

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions