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
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: viperfan at gmx dot net
New email:
PHP Version: OS:

 

 [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

Add a Patch

Pull Requests

Add a Pull Request

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 Mar 28 21:01:27 2024 UTC