php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #4068 htmlentities fails to escape single quote character
Submitted: 2000-04-07 10:57 UTC Modified: 2002-09-30 18:05 UTC
From: php at jon dot oaktree dot co dot uk Assigned:
Status: Closed Package: Misbehaving function
PHP Version: 3.0.16 OS: Any
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: php at jon dot oaktree dot co dot uk
New email:
PHP Version: OS:

 

 [2000-04-07 10:57 UTC] php at jon dot oaktree dot co dot uk
Script to reproduce problem:
  <img alt='<? echo htmlentities($foo) ?>'>

Fix:
  Make it escape the "'" character too.

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-09-30 18:05 UTC] hholzgra@php.net
there's an additional parameter to htmlentites to control this behavior since php3.0.17 and php4.0.3
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Sat Jul 19 06:00:03 2025 UTC