3 ms·
If I want to tweet I <3 O'Reilly books you could pre-encode that as safe to paste into raw SQL, or as well-formed (X)HTML, but you can't do both simultaneou
by prodigal_erik 14y ago
If I want to tweet
I <3 O'Reilly books
you could pre-encode that as safe to paste into raw SQL, or as well-formed (X)HTML, but you can't do both simultaneously. Either encoding would end up distorting the content in the other context. You have to encode during output (and writing to a database counts) using the rules of the system consuming that output. Lots of crappy web forums visibly mangle punctuation in a futile effort to avoid this.
- MartinCron 14y agoWhat a great example. I am going to remember that one.