note 114041 added to function.htmlentities
| From: | hajo-p | Date: | Sun, 05 Jan 2014 17:18:31 +0000 |
| Subject: | note 114041 added to function.htmlentities | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-198119@lists.php.net to get a copy of this message | ||
The flag ENT_HTML5 also strips newline chars like \n with htmlentities while htmlspecialchars is not
affected by that.
If you want to use nl2br on that string afterwards you might end up searching the problem like i
did. This does not apply to other flags like e.g. ENT_XHTML which confused me.
Tested this with PHP 5.4 / 5.5 / 5.6-dev with same results, so it seems that this is an intended
"feature".
----
Server IP: 212.124.37.9
Probable Submitter: 80.171.151.44
----
Manual Page -- http://php.net/manual/en/function.htmlentities.php
Edit -- https://master.php.net/note/edit/114041
Del: integrated -- https://master.php.net/note/delete/114041/integrated
Del: useless -- https://master.php.net/note/delete/114041/useless
Del: bad code -- https://master.php.net/note/delete/114041/bad+code
Del: spam -- https://master.php.net/note/delete/114041/spam
Del: non-english -- https://master.php.net/note/delete/114041/non-english
Del: in docs -- https://master.php.net/note/delete/114041/in+docs
Del: other reasons-- https://master.php.net/note/delete/114041
Reject -- https://master.php.net/note/reject/114041
Search -- https://master.php.net/manage/user-notes.php