Bug #7472 Updated: problem with strip_tags() function
| From: | yohgaki@php.net | Date: | Tue, 22 Jan 2002 12:54:44 +0000 |
| Subject: | Bug #7472 Updated: problem with strip_tags() function | ||
| References: | 1 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-77762@lists.php.net to get a copy of this message | ||
ID: 7472
Updated by: yohgaki
Reported By: kjackson@gpu.srv.ualberta.ca
Status: Analyzed
Bug Type: Strings related
Operating System: linux
Old PHP Version: 4.0
PHP Version: 4.1.1
New Comment:
Version updated
Previous Comments:
------------------------------------------------------------------------
[2002-01-22 07:34:33] martin@humany.com
Bug still exists in PHP 4.1.1, tested under Linux 2.4 and Windows XP
with:
echo strip_tags("first <?echo \"\\\"\"?> second");
------------------------------------------------------------------------
[2001-02-10 15:14:36] jimw@php.net
it is the unbalanced quotes that causes this. smaller example:
<?php
echo strip_tags("first <?echo \"\\\"\"?> second");
?>
refiling against 4.0, although it would be nice if any fix were
backported.
(or the behavior could be documented.)
------------------------------------------------------------------------
[2000-10-25 23:09:32] kjackson@gpu.srv.ualberta.ca
oops, did not escape dollar signs. Doing so does not effect results.
------------------------------------------------------------------------
[2000-10-25 23:06:05] kjackson@gpu.srv.ualberta.ca
This bug causes strip_tags to stop stripping php tags, if your string
contains the following in a <?php?> delimiter.
"title = \"([^\"]+)\""
Example:
echo strip_tags("
aghh1
<?PHP
if (eregi(\"title = \\\"([^\\\"]+)\", $x, $y))
echo \"foobar\";
?>
aghh2
");
will result in only aghh1 being reported when aghh2 should clearly be
as well
------------------------------------------------------------------------
Edit this bug report at http://bugs.php.net/?id=7472&edit=1