#25730 [Ver->Bgs]: ereg_replace or strip_tags unexpected result
| From: | moriyoshi@php.net | Date: | Thu, 02 Oct 2003 14:28:47 +0000 |
| Subject: | #25730 [Ver->Bgs]: ereg_replace or strip_tags unexpected result | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-48433@lists.php.net to get a copy of this message | ||
ID: 25730
Updated by: moriyoshi@php.net
-Summary: strip_tags() ignores tags with whitespace, e.g. < foo
>
Reported By: rs at kunstbar dot tv
-Status: Verified
+Status: Bogus
-Bug Type: Strings related
+Bug Type: Regexps related
-Operating System: *
+Operating System: Windows 2003
-PHP Version: 4.3.4RC2-dev
+PHP Version: 4.3.2
New Comment:
This is quite expected behaviour. The SGML specification doesn't allow
whitespaces to appear right after the less than sign.
Previous Comments:
------------------------------------------------------------------------
[2003-10-02 09:57:21] rs at kunstbar dot tv
Description:
------------
The following reproduce code don't work under Win2003 with PHP 4.3.2.
It works with PHP 4.3.1 on all Operating Systems.
I think this was fixed last year - wasn't it ?!
http://bugs.php.net/bug.php?id=12120
Reproduce code:
---------------
$text = "I think this < doesn't > work. for this: < This must cut > And
here is the Real text from the String. < This must cut > Real Text from
String..";
$text = ereg_replace("[[:blank:]]+"," ",strip_tags($text));
Expected result:
----------------
I think this work. for this: And here is the Real text from the String.
Real Text from String..
Actual result:
--------------
I think this < doesn't > work. for this: < This must cut > And here is
the Real text from the String. < This must cut > Real Text from
String..
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=25730&edit=1