Doc #69449 [ReO->Csd]: htmlspecialchars() flags documentation isn't complete
| From: | narf@php.net | Date: | Mon, 13 Mar 2017 12:46:57 +0000 |
| Subject: | Doc #69449 [ReO->Csd]: htmlspecialchars() flags documentation isn't complete | ||
| References: | 1 | Groups: | php.doc.bugs |
| Request: | Send a blank email to doc-bugs+get-14497@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=69449&edit=1
ID: 69449
Updated by: narf@php.net
Reported by: olafvdspek at gmail dot com
Summary: htmlspecialchars() flags documentation isn't
complete
-Status: Re-Opened
+Status: Closed
Type: Documentation Problem
Package: Strings related
Operating System: *
PHP Version: Irrelevant
-Assigned To:
+Assigned To: narf
Block user comment: N
Private report: N
New Comment:
Fixed in SVN sources.
It takes some time for the changes to propagate though ... IIRC it happens regularly around UTC+1.
Previous Comments:
------------------------------------------------------------------------
[2017-03-13 12:42:04] narf@php.net
Automatic comment from SVN on behalf of narf
Revision: http://svn.php.net/viewvc/?view=revision&revision=342108
Log: Fix docs bug #69449: Explain what happens with ambiguous/missing htmlspecialchars() flags
------------------------------------------------------------------------
[2015-04-14 20:26:31] cmb@php.net
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] <http://lxr.php.net/xref/PHP_5_6/ext/standard/html.h#24>
------------------------------------------------------------------------
[2015-04-14 20:11:57] 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 19:38:09] cmb@php.net
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
functions.
------------------------------------------------------------------------
[2015-04-14 17:48:28] olafvdspek at gmail dot com
Description:
------------
> The default is ENT_COMPAT | ENT_HTML401.
http://php.net/htmlspecialchars
So what does it do when you pass just ENT_HTML401? Or just ENT_COMPAT?
Or both ENT_QUOTES and ENT_NOQUOTES?
Test script:
---------------
-
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=69449&edit=1