#23723 [NEW]: Extend strip_tags()
| From: | eric at evilwalrus dot com | Date: | Tue, 20 May 2003 18:47:14 +0000 |
| Subject: | #23723 [NEW]: Extend strip_tags() | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-40083@lists.php.net to get a copy of this message | ||
From: eric at evilwalrus dot com
Operating system:
PHP version: 4.3.2RC3
PHP Bug Type: Feature/Change Request
Bug description: Extend strip_tags()
Right now strip_tags() is a great function. You specify a string and the
tags you want to keep. What I would like to see is another argument in
strip tags so that you could tell it to keep or remove the tags you
specify. I saw bug #5976 that had something to do with this very thought,
but this extends the idea further. For example, if I have a string full of
HTML and I want to remove all <script> and <meta> tags but keep the rest,
I could do something like
strip_tags($string, '<meta><script>', true);
That boolean value of true as the third argument would tell the
strip_tags() function to remove the tags specified. Without that, it
defaults to the way it is now and removes all but those tags. I think this
would be a very handy thing to have in PHP. Thanks.
--
Edit bug report at http://bugs.php.net/?id=23723&edit=1
--
Try a CVS snapshot: http://bugs.php.net/fix.php?id=23723&r=trysnapshot
Fixed in CVS: http://bugs.php.net/fix.php?id=23723&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=23723&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=23723&r=needtrace
Try newer version: http://bugs.php.net/fix.php?id=23723&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=23723&r=support
Expected behavior: http://bugs.php.net/fix.php?id=23723&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=23723&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=23723&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=23723&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=23723&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=23723&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=23723&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=23723&r=gnused