|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #45340 strip_tags() makes problems with brackets right after angle brackets
Submitted: 2008-06-23 20:42 UTC Modified: 2008-07-15 02:08 UTC
From: viperfan at gmx dot net Assigned:
Status: Not a bug Package: Output Control
PHP Version: 5.2.6 OS: Debian
Private report: No CVE-ID: None
 [2008-06-23 20:42 UTC] viperfan at gmx dot net
strip_tags() returns mutilated text when a "<" (open html tag) is directly followed by ( (open brackets)


strip_crap("Hi (>username<), how are you") 

everthing after "(>username" is chopped off


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2008-06-23 20:44 UTC] viperfan at gmx dot net
of course 

strip_tag("Hi (>username<), how are you") 

was meant
 [2008-07-15 02:08 UTC]
Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at and the instructions on how to report
a bug at

From the manual page for strip_tags(): 


Because strip_tags() does not actually validate the HTML, partial, or broken tags can result in the removal of more text/data than expected."

PHP Copyright © 2001-2023 The PHP Group
All rights reserved.
Last updated: Sun May 28 12:03:40 2023 UTC