Req #78364 [Opn->Nab]: strip_tags should not remove \x00

From: Date: Thu, 01 Aug 2019 21:57:20 +0000
Subject: Req #78364 [Opn->Nab]: strip_tags should not remove \x00
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-222055@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=78364&edit=1 ID: 78364 Updated by: peehaa@php.net Reported by: bkfake-php at yahoo dot com Summary: strip_tags should not remove \x00 -Status: Open +Status: Not a bug Type: Feature/Change Request Package: Strings related Operating System: osx PHP Version: 7.3.8 Block user comment: N Private report: N New Comment: This is clearly documented. https://www.php.net/manual/en/function.trim.php Previous Comments: ------------------------------------------------------------------------ [2019-08-01 21:55:35] requinix@php.net Undocumented? Are you sure about that? ------------------------------------------------------------------------ [2019-08-01 21:50:50] bkfake-php at yahoo dot com Description: ------------ strip_tags strips the null character \x00 from the string this is neither documented nor desired behavior tested on v5.6.40 and 7.1.25 - 7.4.0beta1 Test script: --------------- // outputs "where'd null go?" $str = "hello\x00world"; $strAfter = strip_tags($str); if ($str == $strAfter) { echo 'all is well'; } else { echo "where'd null go?"; } Expected result: ---------------- null char should remain and output "all is well" Actual result: -------------- outputs "where'd null go?" ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=78364&edit=1

« previous php.bugs (#222055) next »