|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #78346 strip_tags no longer handling nested php tags
Submitted: 2019-07-29 11:20 UTC Modified: 2019-08-02 15:01 UTC
From: development at admeen dot com Assigned: cmb (profile)
Status: Closed Package: Strings related
PHP Version: 7.3.7 OS: MacOS & Linux
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
Solve the problem:
31 + 42 = ?
Subscribe to this entry?

 [2019-07-29 11:20 UTC] development at admeen dot com
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:
$str = '<?= \'<?= 1 ?>\' ?>2';

Expected result:
string(1) "2"

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


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2019-07-29 11:29 UTC] 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 12:30 UTC]
-Status: Open +Status: Verified
 [2019-07-29 12:30 UTC]
This regression has been introduced with commit 5cf6474[1].

[1] <;a=commit;h=5cf64742773ddbf9af69d962a4d12b567fcf0084>
 [2019-08-02 15:01 UTC]
-Assigned To: +Assigned To: cmb
 [2019-08-02 15:05 UTC]
Automatic comment on behalf of
Log: Fix #78346: strip_tags no longer handling nested php tags
 [2019-08-02 15:05 UTC]
-Status: Verified +Status: Closed
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Mon May 20 19:01:33 2024 UTC