php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #60060 the explaination of the argument allowable_tags for strip_tags() is wrong
Submitted: 2011-10-14 05:43 UTC Modified: 2011-12-03 06:32 UTC
From: zhkzyth at gmail dot com Assigned:
Status: Not a bug Package: Documentation problem
PHP Version: 5.3.8 OS: windows7
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: zhkzyth at gmail dot com
New email:
PHP Version: OS:

 

 [2011-10-14 05:43 UTC] zhkzyth at gmail dot com
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)""


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2011-12-03 06:32 UTC] frozenfire@php.net
Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to report
a bug at http://bugs.php.net/how-to-report.php

So far as I can tell, the documentation indicates the behaviour. I'm not entirely 
sure what you're trying to say is wrong, but I think you may just understand what 
the documentation is saying.
 [2011-12-03 06:32 UTC] frozenfire@php.net
-Status: Open +Status: Bogus
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Mar 29 12:01:27 2024 UTC