Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

It does less than making HTML whitespace-significant. It's unsuitable for use on HTML markup, because newlines in <script>, inside tags, attributes, comments, etc. should not be changed.

It's only safe and reliable as a part of nl2br(htmlspecialchars()) combo, so a function that does both could have been a better idea.



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: