#50664 [Opn]: Documentation should more clearly list actual behavior
| From: | deltascrewyoumail2 at spamplz dot hmx dot de | Date: | Tue, 05 Jan 2010 00:09:35 +0000 |
| Subject: | #50664 [Opn]: Documentation should more clearly list actual behavior | ||
| References: | 1 | Groups: | php.doc.bugs |
| Request: | Send a blank email to doc-bugs+get-3617@lists.php.net to get a copy of this message | ||
ID: 50664
User updated by: deltascrewyoumail2 at spamplz dot hmx dot de
-Reported By: deltaforce2 at gmx dot de
+Reported By: deltascrewyoumail2 at spamplz dot hmx dot de
Status: Open
Bug Type: Documentation problem
Operating System: Linux
PHP Version: Irrelevant
New Comment:
required field
Previous Comments:
------------------------------------------------------------------------
[2010-01-05 00:04:37] deltascrewyoumail2 at spamplz dot hmx dot de
Description:
------------
The Documentation for strip_tags() should mention that the function
does not actually look for any html or php Tags but actually just
searches for the "<" sign and removes everything from that Position
until it encounters a ">" sign. If there is no ">" in the String the
whole string will be cut from the Position of the "<" sign.
Reproduce code:
---------------
---
From manual page: function.strip-tags
---
<?php
$text = "This text has no HTML or PHP Tags and is <50 characters in
total length but it wont be listed!";
echo strip_tags($text) . '<br/>';
$text = "This Text <span>Text has HTML Tags</span> and will be listed
correctly.";
echo strip_tags($text);
?>
Expected result:
----------------
Both Text Variables to be returned completely with the exception of the
<span> and </span> which are html tags. But thats another issue which I
doubt will be fixed. So the Added Note in the Documentation should
suffice.
Actual result:
--------------
This text has no HTML or PHP Tags and is
This Text Text has HTML Tags and will be listed correctly.
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=50664&edit=1