|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #69449 htmlspecialchars() flags documentation isn't complete
Submitted: 2015-04-14 17:48 UTC Modified: 2017-03-13 12:46 UTC
From: olafvdspek at gmail dot com Assigned: narf (profile)
Status: Closed Package: Strings related
PHP Version: Irrelevant OS: *
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Bug Type:
From: olafvdspek at gmail dot com
New email:
PHP Version: OS:


 [2015-04-14 17:48 UTC] olafvdspek at gmail dot com
> The default is ENT_COMPAT | ENT_HTML401.

So what does it do when you pass just ENT_HTML401? Or just ENT_COMPAT?

Test script:


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2015-04-14 19:38 UTC]
-Status: Open +Status: Not a bug -Assigned To: +Assigned To: cmb
 [2015-04-14 19:38 UTC]
In these cases the behavior is as usual when one passes an argument
to an optional parameter: the passed argument overrides the
default. There is nothing special to bitmasks in this regard. I
don't see that this needs explicit documentation for individual
 [2015-04-14 20:11 UTC] olafvdspek at gmail dot com
I know the default is overriden and bitmasks are nothing special, but what does the function do in that case?
It's not clear from the documentation.
 [2015-04-14 20:26 UTC]
-Status: Not a bug +Status: Re-Opened -Assigned To: cmb +Assigned To:
 [2015-04-14 20:26 UTC]
I was a bit quick in my judgement and have to admit that you're
right; the documentation isn't clear enough. Thanks for broaching
the subject again.

FWIW: the code[1] clarifies the issue somewhat.

[1] <>
 [2015-04-20 22:28 UTC]
-Type: Bug +Type: Documentation Problem -Package: Documentation problem +Package: Strings related
 [2017-03-13 12:42 UTC]
Automatic comment from SVN on behalf of narf
Log: Fix docs bug #69449: Explain what happens with ambiguous/missing htmlspecialchars() flags
 [2017-03-13 12:46 UTC]
-Status: Re-Opened +Status: Closed -Assigned To: +Assigned To: narf
 [2017-03-13 12:46 UTC]
Fixed in SVN sources.

It takes some time for the changes to propagate though ... IIRC it happens regularly around UTC+1.
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sun Jul 14 01:01:28 2024 UTC