forked from pablosichert/react-show-more
-
Notifications
You must be signed in to change notification settings - Fork 56
Open
Description
When ShowMoreText is collapsed, then any HTML tags that are present in the children (not as JSX, but as a raw string) are not sanitized properly. It appears that this happens in the Truncate inner component logic. This is a problem for us, since we do occasionally have HTML in our text, which we want to remain raw (not rendered).
Example
const line = "<b>Test</b>\n";
let content = "";
for (var i = 0; i < 20; i++) {
content += line;
}
return (
<ShowMoreText
expanded={false}
keepNewLines={true}
lines={5}
>
{content}
</ShowMoreText>
);
Collapsed
Expanded
gpramvr1, Sejsel and hotetecgit
Metadata
Metadata
Assignees
Labels
No labels

