Bug #69449 [Nab->ReO]: htmlspecialchars() flags documentation isn't complete

From: Date: Tue, 14 Apr 2015 20:26:31 +0000
Subject: Bug #69449 [Nab->ReO]: htmlspecialchars() flags documentation isn't complete
References: 1  Groups: php.doc.bugs 
Request: Send a blank email to doc-bugs+get-12148@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: cmb@php.net Reported by: olafvdspek at gmail dot com Summary: htmlspecialchars() flags documentation isn't complete -Status: Not a bug +Status: Re-Opened Type: Bug Package: Documentation problem Operating System: * PHP Version: Irrelevant -Assigned To: cmb +Assigned To: Block user comment: N Private report: N New Comment: 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> Previous Comments: ------------------------------------------------------------------------ [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

« previous php.doc.bugs (#12148) next »