Bug #78346 [Opn]: strip_tags no longer handling nested php tags
| From: | development at admeen dot com | Date: | Mon, 29 Jul 2019 11:29:44 +0000 |
| Subject: | Bug #78346 [Opn]: strip_tags no longer handling nested php tags | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-221986@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
User updated by: development at admeen dot com
Reported by: development at admeen dot com
Summary: strip_tags no longer handling nested php tags
Status: Open
Type: Bug
Package: Strings related
Operating System: MacOS & Linux
PHP Version: 7.3.7
Block user comment: N
Private report: N
New Comment:
I would like to add that it also is happening in v7.3.3, but works as expected in v7.2 & v7.1.
Previous Comments:
------------------------------------------------------------------------
[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