Skip to content

word-break in style is discarded because it is not considered a valid value in CSSSchema #192

Open
@mrabhishek

Description

@mrabhishek

input:

<div>
<table>
<td style="word-break: keep-all;">
</td>
</table>
</div>

policy:
Sanitizers.BLOCKS .and(Sanitizers.FORMATTING) .and(Sanitizers.LINKS) .and(Sanitizers.TABLES) .and(Sanitizers.IMAGES) .and(Sanitizers.STYLES) .and(.and(new HtmlPolicyBuilder() .allowElements("style") .allowAttributes("style").onElements("td", "table","div") .allowAttributes("type", "word-break").onElements("style") .toFactory());

Expected output (should contain word-break).

<div>
<table>
<td style="word-break: keep-all;">
</td>
</table>
</div>

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions