by skrebbel · 14y ago · 0 comments
> ??? Is that a joke? Don't do that! That's just as bad as magic quotes.
No, it's not. Magic quotes are a pain to reverse. HTML escaping can be built into the echo/print/<?= .. ?> commands, so that it is:
- A setting that can be totally turned off at run-time, if you want;
- Easily overridden on a case-by-case basis with a 'rawecho' function that
does *not* escape anything.Plus too many cases of extra backslashes from back in the magic quotes days.
HTML escaping is not the one and only escaping strategy that magically makes everything safe. So any automated system would need to incorporate overrides on a per variable basis.
http://blog.astrumfutura.com/2012/06/automatic-output-escapi...