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

From: Date: Fri, 02 Aug 2019 15:05:58 +0000
Subject: Bug #78346 [Ver->Csd]: strip_tags no longer handling nested php tags
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-222068@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: Verified +Status: Closed Type: Bug Package: Strings related Operating System: MacOS & Linux PHP Version: 7.3.7 Assigned To: cmb Block user comment: N Private report: N New Comment: Automatic comment on behalf of cmbecker69@gmx.de Revision: http://git.php.net/?p=php-src.git;a=commit;h=a87ef5e3ddfdb3083c2b62bb25835b74d9a3d083 Log: Fix #78346: strip_tags no longer handling nested php tags Previous Comments: ------------------------------------------------------------------------ [2019-07-29 12:30:08] cmb@php.net This regression has been introduced with commit 5cf6474[1]. [1] <http://git.php.net/?p=php-src.git;a=commit;h=5cf64742773ddbf9af69d962a4d12b567fcf0084> ------------------------------------------------------------------------ [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

« previous php.bugs (#222068) next »