Bug #78346 [Opn->Ver]: strip_tags no longer handling nested php tags

From: Date: Mon, 29 Jul 2019 12:30:09 +0000
Subject: Bug #78346 [Opn->Ver]: strip_tags no longer handling nested php tags
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-221989@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=78346&edit=1

 ID:                 78346
 Updated by:         cmb@php.net
 Reported by:        development at admeen dot com
 Summary:            strip_tags no longer handling nested php tags
-Status:             Open
+Status:             Verified
 Type:               Bug
 Package:            Strings related
 Operating System:   MacOS & Linux
 PHP Version:        7.3.7
 Block user comment: N
 Private report:     N

 New Comment:

This regression has been introduced with commit 5cf6474[1].

[1] <http://git.php.net/?p=php-src.git;a=commit;h=5cf64742773ddbf9af69d962a4d12b567fcf0084>


Previous Comments:
------------------------------------------------------------------------
[2019-07-29 11:29:44] development at admeen dot com

I would like to add that it also is happening in v7.3.3, but works as expected in v7.2 & v7.1.

------------------------------------------------------------------------
[2019-07-29 11:20:13] development at admeen dot com

Description:
------------
After upgrading from v7.3.3 to v7.3.7 it appears nested "php tags" inside a string are no
longer being stripped correctly by strip_tags().

This is still working in v7.3.3, v7.2 & v7.1. I've added a simple test below.

Test script:
---------------
<?php
$str = '<?= \'<?= 1 ?>\' ?>2';
var_dump(strip_tags($str));

Expected result:
----------------
string(1) "2"

Actual result:
--------------
string(5) "' ?>2"


------------------------------------------------------------------------



--
Edit this bug report at https://bugs.php.net/bug.php?id=78346&edit=1


Thread (4 messages)

« previous php.bugs (#221989) next »