php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #9072 unexpected behavior in strip_tags
Submitted: 2001-02-02 08:08 UTC Modified: 2001-02-02 08:48 UTC
From: ctuffli at yahoo dot com Assigned:
Status: Closed Package: Feature/Change Request
PHP Version: 4.0.4 OS: RedHat 6.1
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 you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: ctuffli at yahoo dot com
New email:
PHP Version: OS:

 

 [2001-02-02 08:08 UTC] ctuffli at yahoo dot com
php setup: ./configure  --with-apxs=/usr/local/etc/httpd/bin/apxs --enable-versioning --with-mysql --enable-track-vars

script: <?php
	print strip_tags("> from an earlier email\n");
?>

prints

X-Powered-By: PHP/4.0.4
Content-type: text/html

 from an earlier email

and not
> from an earlier email

I'm writting an application which prints email messages and noticed this behavior in messages that quoted the previous message with the string "> ".  I expected strip_tags to do the equivalent of ereg_replace("<[^>]*>", "", $msg)

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2001-02-02 08:48 UTC] rasmus@php.net
Fixed in CVS
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Fri Jul 04 14:01:35 2025 UTC