|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2015-05-06 14:21 UTC] cmb@php.net
Description: ------------ --- From manual page: http://www.php.net/function.strip-tags --- The third note about the $allowable_tags parameter reverts its meaning: | In PHP 5.3.4 and later, you will also need to include the | self-closing XHTML tag to strip these from str. For example, to | strip both <br> and <br/>, you should use: Instead of "strip", "preserved" or so should be used. PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sat Oct 25 17:00:01 2025 UTC |
I found this too. As far as I can tell this note, and the note in the changelog, are 100% nonsense. The parameter is for allowable, not preserved. But also, it doesn't seem to have any truth whatsoever to it. echo strip_tags('<br><br />','<br>'); produces "<br><br />". echo strip_tags('<br><br />',''); produces "". i.e. self-closing is not a consideration at any point.