php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #16724 strip_tags function
Submitted: 2002-04-21 15:08 UTC Modified: 2002-04-22 04:13 UTC
Votes:1
Avg. Score:1.0 ± 0.0
Reproduced:0 of 0 (0.0%)
From: tobaco at libero dot it Assigned:
Status: Not a bug Package: Documentation problem
PHP Version: 4.2.0 OS: linux
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: tobaco at libero dot it
New email:
PHP Version: OS:

 

 [2002-04-21 15:08 UTC] tobaco at libero dot it

For esample:
$HtmlText = strip_tags($HtmlText,'<b><i><p><table><td><tr>');

If your $HtmlText is like this:
.....
<tr>
<td><font size="5">Hello!!</font></td>
</tr>
.....

the font tag can not be stripped.
I think that all tags present in allowable tags not are stripped.
This is not present in manual reference

Thank u for all

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-04-21 16:47 UTC] alindeman@php.net
Maybe I'm misunderstanding but the following script

<?
$string=strip_tags("<tr><td><font size='5'>hello</font></td><tr>","<tr><td>");
print $string;
?>

will produce

"<tr><td>hello</td><tr>"

(expected behavior)

Please expand on what your saying (b/c your first post was a bit hard to understand) or this is bogus.



 [2002-04-22 04:00 UTC] tobaco at libero dot it
Excuse me but i have made mistake
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Tue May 13 10:01:27 2025 UTC