Req #78364 [Com]: strip_tags should not remove \x00

From: Date: Thu, 01 Aug 2019 21:58:48 +0000
Subject: Req #78364 [Com]: strip_tags should not remove \x00
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-222056@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 Comment by: peehaa@php.net Reported by: bkfake-php at yahoo dot com Summary: strip_tags should not remove \x00 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: Sorry Damien you were too fast again :-) Want to change it back to FR? Previous Comments: ------------------------------------------------------------------------ [2019-08-01 21:57:20] peehaa@php.net This is clearly documented. https://www.php.net/manual/en/function.trim.php ------------------------------------------------------------------------ [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 (#222056) next »