Re:Mern: Build JavaScript apps using React and Redux
by windsurfer on Thursday February 18, 2016 @11:32AM
(#11126914)
I think your first problem is whitelisting HTML entities. Unless you're composing HTML-formatted email, it's usually better to use a different markup syntax like a minimal markdown or asciidoc that can safely be escaped.
Re:Mern: Build JavaScript apps using React and Redux
by eterm on Thursday February 18, 2016 @01:59PM
(#11128291)
I agree, although for non-technical users, the better wysiwyg editors are still HTML based, unless you have a recommendation for an in-browser wysiwyg editor that returns/exports markdown?
If you escape one step further you'll lose formatting or the message, so sanitisation is important too, it is reductive to say "always escape never sanitise".