php.net |  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
Description:
------------
strip_tags() returns mutilated text when a "<" (open html tag) is directly followed by ( (open brackets)

eg.

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

everthing after "(>username" is chopped off



Patches

Pull Requests

History

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] jani@php.net
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

From the manual page for strip_tags(): 

"Warning

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-2024 The PHP Group
All rights reserved.
Last updated: Thu Dec 26 22:01:28 2024 UTC