3 ms·
If you are doing HTML sanitization, white-listing is the way to go (both HTML and CSS). Another thing to note is that if you are trying to get away with sanitiz
by niyazpk 17y ago
If you are doing HTML sanitization, white-listing is the way to go (both HTML and CSS). Another thing to note is that if you are trying to get away with sanitization by some regex magic, you are destined to fail.
In many cases, you don't have to use HTML at all. Use something like MarkDown and it will save you a lot of time and frustration. http://daringfireball.net/projects/markdown/ http://daringfireball.net/projects/markdown/
- bensummers 17y agoMy app gets people uploading test data which is provided formatted in HTML, so I don't have the luxury of requiring a different markup language. But you're right, using HTML is very often overkill.
- TomasSedovic 17y agoUnfortunatelly MarkDown both allows HTML and uses regex magic :-).