php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #6707 Treatment of ' in htmlspecialchars() funcation
Submitted: 2000-09-13 05:21 UTC Modified: 2000-09-13 05:26 UTC
From: andrew at smoothsale dot com Assigned:
Status: Closed Package: *Function Specific
PHP Version: 4.0.2 OS: Linux
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem:
10 + 12 = ?
Subscribe to this entry?

 
 [2000-09-13 05:21 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

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2000-09-13 05:26 UTC] rasmus@php.net
The optional second arg is only available in the CVS version and will be in 4.0.3
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Apr 25 23:01:29 2024 UTC