Doc #60060 [NEW]: the explaination of the argument allowable_tags for strip_tags() is wrong
| From: | zhkzyth at gmail dot com | Date: | Fri, 14 Oct 2011 05:43:58 +0000 |
| Subject: | Doc #60060 [NEW]: the explaination of the argument allowable_tags for strip_tags() is wrong | ||
| Groups: | php.doc.bugs | ||
| Request: | Send a blank email to doc-bugs+get-7324@lists.php.net to get a copy of this message | ||
From:
Operating system: windows7
PHP version: 5.3.8
Package: Documentation problem
Bug Type: Documentation Problem
Bug description:the explaination of the argument allowable_tags for strip_tags() is wrong
Description:
------------
---
From manual page:
http://www.php.net/function.strip-tags#refsect1-function.strip-
tags-parameters
---
the note says that the second parameter allowable_tags "sees a tag as a
case-
insensitive string between < and the first whitespace or >."
But it gives a wrong example,because strip_tags("<br/>", "<br>")
return a
string.just see the test script.
And the right example should be like below script:
$tt=strip_tags("<br/>","<br >");//just give the second prarameter a
whitespace
var_dump($tt);//which returns string(0)""
Test script:
---------------
$test=strip_tags("<br/>","<br>");
var_dump($test);//which returns string(5)""
$tt=strip_tags("<br/>","<br >");//just give the second prarameter a
whitespace
var_dump($tt);//which returns string(0)""
--
Edit bug report at https://bugs.php.net/bug.php?id=60060&edit=1
--
Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=60060&r=trysnapshot54
Try a snapshot (PHP 5.3): https://bugs.php.net/fix.php?id=60060&r=trysnapshot53
Try a snapshot (trunk): https://bugs.php.net/fix.php?id=60060&r=trysnapshottrunk
Fixed in SVN: https://bugs.php.net/fix.php?id=60060&r=fixed
Fixed in SVN and need be documented: https://bugs.php.net/fix.php?id=60060&r=needdocs
Fixed in release: https://bugs.php.net/fix.php?id=60060&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=60060&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=60060&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=60060&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=60060&r=support
Expected behavior: https://bugs.php.net/fix.php?id=60060&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=60060&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=60060&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=60060&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=60060&r=php4
Daylight Savings: https://bugs.php.net/fix.php?id=60060&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=60060&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=60060&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=60060&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=60060&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=60060&r=mysqlcfg