php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #6224 strip_tags problem
Submitted: 2000-08-17 16:46 UTC Modified: 2000-09-17 21:14 UTC
From: adrox at home dot com Assigned:
Status: Closed Package: Scripting Engine problem
PHP Version: 4.0.1pl2 OS: Windows 98
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: adrox at home dot com
New email:
PHP Version: OS:

 

 [2000-08-17 16:46 UTC] adrox at home dot com
I was trying to strip all html tags from a file except for <img> tags so i used:

$html = strip_tags($html,"<img>");

This worked fine except that it stripped anything that was enclosed in brackets () from the image source. I easily got around that but it's a small bug I believe.

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2000-08-20 04:43 UTC] stas@php.net
Could you provide an example of what was there in $html?
 [2000-08-25 16:30 UTC] adrox at home dot com
To me it seemed to work with all the examples I tried that had something like this:

img src="/images/file-(1).gif"

it would delete the () thus leaving:

img src="/images/file-1.gif"
 [2000-09-17 21:14 UTC] stas@php.net
Cannot reproduce it. Please reopen with reproducing example if it still happens.
 
PHP Copyright © 2001-2026 The PHP Group
All rights reserved.
Last updated: Sat Oct 10 07:00:01 2026 UTC