#51102 [Opn]: strip_tags wraps around on tags longer than 1023 characters

From: Date: Sat, 20 Feb 2010 22:15:45 +0000
Subject: #51102 [Opn]: strip_tags wraps around on tags longer than 1023 characters
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-147908@lists.php.net to get a copy of this message
ID: 51102 User updated by: tolkad dot freenode at gmail dot com -Reported By: tolkad dot freenode at gmail dot om +Reported By: tolkad dot freenode at gmail dot com Status: Open Bug Type: *General Issues Operating System: N/A PHP Version: 5.3.1 New Comment: fixed email address Previous Comments: ------------------------------------------------------------------------ [2010-02-20 22:12:41] tolkad dot freenode at gmail dot com Description: ------------ If there are allowed tags, strip_tags will wrap around tags greater than 1023 (PHP_TAG_BUF_SIZE) characters. If this is absolutely necessary it should at least be documented. Also, why does strip_tags strip null bytes and why isn't this documented? Reproduce code: --------------- <?php $str = "<a" . str_repeat(' ', 1021) . ">"; echo strip_tags($str, "<a>"); Expected result: ---------------- <a(1021 spaces)> Actual result: -------------- > ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=51102&edit=1

« previous php.bugs (#147908) next »