php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #25730 ereg_replace or strip_tags unexpected result
Submitted: 2003-10-02 09:57 UTC Modified: 2003-10-02 10:35 UTC
From: rs at kunstbar dot tv Assigned:
Status: Not a bug Package: Strings related
PHP Version: 4.3.2 OS: Windows 2003
Private report: No CVE-ID: None
 [2003-10-02 09:57 UTC] 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.. 

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2003-10-02 10:28 UTC] moriyoshi@php.net
This is quite expected behaviour. The SGML specification doesn't allow whitespaces to appear right after the less than sign.

 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Mar 29 07:01:28 2024 UTC