|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #21453 strip_tags behaviour change
Submitted: 2003-01-06 01:14 UTC Modified: 2003-01-06 16:16 UTC
From: pw0kt32001 at sneakemail dot com Assigned:
Status: Closed Package: Strings related
PHP Version: 4.3.0 OS: Windows XP
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Bug Type:
From: pw0kt32001 at sneakemail dot com
New email:
PHP Version: OS:


 [2003-01-06 01:14 UTC] pw0kt32001 at sneakemail dot com
A "<" as plaintext is something strip_tags can't make much sense of, sure. My previous report ( ) was indeed bogus, but what about this.

$test = "<table>\n<tr><td>first cell before < first cell after</td></tr>\n<tr><td>second cell before < second cell after</td></tr>\n</table>\n";
$testarray = explode("\n",strip_tags($test));

    [0] => 
    [1] => first cell before 
    [2] => second cell before 
    [3] => 
    [4] => 

    [0] => 
    [1] => first cell before 

Is this also per design? Parsing third-party webpages created by someone/some program that disregards that &lt; should be used instead of "<" became a bit more difficult with 4.3.0. Not hard to code around, but certainly an annoyance compared to 4.2.3.


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2003-01-06 16:17 UTC]
This bug has been fixed in CVS.

In case this was a PHP problem, snapshots of the sources are packaged
every three hours; this change will be in the next snapshot. You can
grab the snapshot at
In case this was a documentation problem, the fix will show up soon at

In case this was a website problem, the change will show
up on the site and on the mirror sites in short time.
Thank you for the report, and for helping us make PHP better.

PHP Copyright © 2001-2022 The PHP Group
All rights reserved.
Last updated: Tue Aug 09 22:03:36 2022 UTC