php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #6708 Treatment of ' in htmlspecialchars() function
Submitted: 2000-09-13 05:31 UTC Modified: 2001-04-27 20:39 UTC
From: andrew at smoothsale dot com Assigned:
Status: Not a bug Package: *Function Specific
PHP Version: 4.0.2 OS: Linux
Private report: No CVE-ID: None
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: andrew at smoothsale dot com
New email:
PHP Version: OS:

 

 [2000-09-13 05:31 UTC] andrew at smoothsale dot com
Regarding htmlspecialchars() function

What's going on with this function regarding the treatment of single '. I've tried using the optional second parameter ENT_COMPAT, and I get an error message saying "wrong number of parameters". This is with version 4.0.2.

If you don't use the parameter, ' gets converted to #039; . This is in contrast to what is shown in the online documentation.

I'm just using a simple function call:
    $str = htmlspecialchars($str);

Regards,
Andrew


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2001-04-27 20:39 UTC] sniper@php.net
submitted twice (#6707)
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Dec 26 16:01:31 2024 UTC