Closed pantharshit00 closed 7 years ago
If I read that right, the sanitize function is removing all HTML tags and then slicing the string if it has more than 55 words. But won't doing such a thing remove the purpose of using dangerouslySetInnerHTML in the first place??
I am not setting it as dangerouslySetInnerHTML
. I am reading it from state. It is as because I only want the text on the post preview component not the complete html. It did the words instead of characters because last word might trim if we do substring.
Thanks @pantharshit00 !
(Closes #32 #33 #34) This PR adds the features listed in above issues.
IMPORTANT THIS PR CONTAINS CHANGES FROM #39 . MERGE THAT FIRST. READ INSTRUCTION IN ITS NOTES VERY CAREFULLY
HOPE THIS HELPS YOU OUT