3 ms·
Wow that's odd. Also, PHP has a built in function for filtering filtering plain-text user input to create HTML? That's... not something I would have expected.
by lelandbatey 11y ago
Wow that's odd. Also, PHP has a built in function for filtering filtering plain-text user input to create HTML? That's... not something I would have expected.
- nkozyra 11y agoSarcasm? PHP has a built-in function for any oddball thing you can think of.
- duskwuff 11y agoPersonal fav: gzgetss(). Reads a line from a gzip file handle and strips HTML tags from it. Why? I don't know! http://php.net/manual/en/function.gzgetss.php http://php.net/manual/en/function.gzgetss.php
- ars 11y agoIt's super useful. If you have a textarea for users to type paragraphs into you can use nl2br to output it more or less the same, but in HTML. (Be sure and escape the text before nl2br not after.)