note 88991 added to function.strip-tags
| From: | CEO at CarPool2Camp dot org | Date: | Tue, 17 Feb 2009 19:10:27 +0000 |
| Subject: | note 88991 added to function.strip-tags | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-150755@lists.php.net to get a copy of this message | ||
For some reason, this note got removed, perhaps because a moderator thought it was a bug report. I
hope awareness of this
"Interesting Behavior" can save someone from an unpleasant surprise. Note the different
outputs from different versions of the same tag:
<?php // striptags.php
$data = '<br>Each<br/>New<br />Line';
$new = strip_tags($data, '<br>');
var_dump($new); // OUTPUTS string(21) "<br>EachNew<br />Line"
<?php // striptags.php
$data = '<br>Each<br/>New<br />Line';
$new = strip_tags($data, '<br/>');
var_dump($new); // OUTPUTS string(16) "Each<br/>NewLine"
<?php // striptags.php
$data = '<br>Each<br/>New<br />Line';
$new = strip_tags($data, '<br />');
var_dump($new); // OUTPUTS string(11) "EachNewLine"
----
Server IP: 209.41.74.194
Probable Submitter: 98.169.54.127
----
Manual Page -- http://www.php.net/manual/en/function.strip-tags.php
Edit -- https://master.php.net/note/edit/88991
Del: integrated -- https://master.php.net/note/delete/88991/integrated
Del: useless -- https://master.php.net/note/delete/88991/useless
Del: bad code -- https://master.php.net/note/delete/88991/bad+code
Del: spam -- https://master.php.net/note/delete/88991/spam
Del: non-english -- https://master.php.net/note/delete/88991/non-english
Del: in docs -- https://master.php.net/note/delete/88991/in+docs
Del: other reasons-- https://master.php.net/note/delete/88991
Reject -- https://master.php.net/note/reject/88991
Search -- https://master.php.net/manage/user-notes.php