fus-marcom / bulletin-react

React/Redux version of the University Bulletin
MIT License
42 stars 18 forks source link

Added requested features. Closes #32 #33 #34 #41

Closed pantharshit00 closed 7 years ago

pantharshit00 commented 7 years ago

(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

          HARSHIT
Rud156 commented 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??

pantharshit00 commented 7 years ago

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.

JesseRWeigel commented 7 years ago

Thanks @pantharshit00 !