Bug #78003 [Opn]: strip_tags output change since PHP 7.3

From: Date: Sun, 12 May 2019 00:00:51 +0000
Subject: Bug #78003 [Opn]: strip_tags output change since PHP 7.3
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-220824@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=78003&edit=1 ID: 78003 Updated by: cmb@php.net Reported by: alex at buayacorp dot com Summary: strip_tags output change since PHP 7.3 Status: Open Type: Bug Package: *General Issues PHP Version: 7.3.5 Block user comment: N Private report: N New Comment: Looks like the behavior has changed as of commit 5cf6474[1]. [1] <http://git.php.net/?p=php-src.git;a=commit;h=5cf64742773ddbf9af69d962a4d12b567fcf0084> Previous Comments: ------------------------------------------------------------------------ [2019-05-11 12:27:29] alex at buayacorp dot com Description: ------------ While doing the migration from PHP 7.2 to PHP 7.3, we noticed an output change of strip_tags which broke some text parsing related code in our application. Since the release notes from PHP 7.3 only mentions the deprecation of strip tags stream filtering [1], we are wondering if this output change was an intended or not. You can see the different output in https://3v4l.org/lE5Vb [1] https://php.net/manual/en/migration73.deprecated.php#migration73.deprecated.core.strip-tags-streaming Test script: --------------- <?php $s=<<<FOO <script>if (i<j.length);</script> hola<a href="foo">demo</a> <script> /* <![CDATA[ */ /* ]]> */ if(a>2); </script> demo bar FOO; var_dump(strip_tags( $s, '<a>' )); Expected result: ---------------- string(18) "if (i2); demo bar" Actual result: -------------- string(26) "if (i */ if(a2); demo bar" ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=78003&edit=1

« previous php.bugs (#220824) next »