Hacker News new | ask | show | jobs
by growse 703 days ago
Validating data on input is just checking for "known badness", and is pretty ineffective.

If you've got specific structure requirements for the data you store, parse it into that structure.

1 comments

Right -- I would include that in "transform" in my example above.

I've seen too many forum developers spend far too much time after the fact dealing with their decision to "just use TinyMCE" ==> Oh hey, you're a server-side HTML parsing expert now anyway; wasn't that what you were trying to avoid?