#42865 [Opn->Bgs]: strip_tags() doesn't respect the given allowable tag

From: Date: Sat, 06 Oct 2007 10:12:22 +0000
Subject: #42865 [Opn->Bgs]: strip_tags() doesn't respect the given allowable tag
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-118257@lists.php.net to get a copy of this message
ID: 42865 Updated by: johannes@php.net Reported By: kraghuba at in dot ibm dot com -Status: Open +Status: Bogus Bug Type: Strings related Operating System: windows XP,linux PHP Version: 5CVS-2007-10-05 (snap) New Comment: Thank you for taking the time to write to us, but this is not a bug. Please double-check the documentation available at http://www.php.net/manual/ and the instructions on how to report a bug at http://bugs.php.net/how-to-report.php This function isn't made for wrong usage. Previous Comments: ------------------------------------------------------------------------ [2007-10-05 10:51:45] kraghuba at in dot ibm dot com Description: ------------ strip_tags() doesn't respect the given allowable tag. for example var_dump(strip_tags("<html>Hello World</html>", "<<html>>") ); given the allowable tag as "<<html>>" allows the <html> tag which, i think is not desirable. <<html>> is not same as <html>. Reproduce code: --------------- <?php var_dump( strip_tags("<html>Hello World</html>", "<<html>>") ); ?> Expected result: ---------------- string(11) "Hello World" Actual result: -------------- string(24) "<html>Hello World</html>" ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=42865&edit=1

« previous php.bugs (#118257) next »