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
 [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

Add a Patch

Pull Requests

Add a Pull Request

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-2024 The PHP Group
All rights reserved.
Last updated: Thu May 02 08:01:32 2024 UTC