forked from pablosichert/react-show-more
-
Notifications
You must be signed in to change notification settings - Fork 55
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
HTML in children is not sanitized within collapsed component #33
Comments
We have the same problem, as in the HTML rendering doesn't have the same behaviour in collapsed vs. non-collapsed form. |
Hello :) |
try this:
|
Then we have the reverse : the collapsed form will have the HTML tags and the non collapsed form will be formated. |
Hi. The issue still persists. Any luck fixing that? |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
When
ShowMoreText
is collapsed, then any HTML tags that are present in thechildren
(not as JSX, but as a raw string) are not sanitized properly. It appears that this happens in theTruncate
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
Collapsed
Expanded
The text was updated successfully, but these errors were encountered: