Skip to content

Truncate remove inline styles when dangerouslySetInnerHtml function #14

@mrjosshi

Description

@mrjosshi

import Truncate from 'react-truncate-html';
<Truncate
lines={3}
dangerouslySetInnerHTML={{
__html: "Hi, <strong style='font-size:30px''>here’s some HTML"
}}
/>

it will remove font-size from strong tag. could you please fix this

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions