Req #69908 [Asn]: Accept array for htmlspecialchars/htmlentities
| From: | yohgaki@php.net | Date: | Tue, 23 Jun 2015 09:39:10 +0000 |
| Subject: | Req #69908 [Asn]: Accept array for htmlspecialchars/htmlentities | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-193788@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=69908&edit=1
ID: 69908
Updated by: yohgaki@php.net
Reported by: yohgaki@php.net
Summary: Accept array for htmlspecialchars/htmlentities
Status: Assigned
Type: Feature/Change Request
Package: Strings related
PHP Version: Irrelevant
Assigned To: yohgaki
Block user comment: N
Private report: N
New Comment:
I can take care of them also.
I also notice that current php_html_entities implementation is not optimal.
It can take 1st parameter as zval and convert int/float simply to string.
Previous Comments:
------------------------------------------------------------------------
[2015-06-23 09:08:13] requinix@php.net
What about all the other functions that take a string? add[c]slashes, bin2hex, md5, trim,
[raw]urlencode... And what about html_entity_decode and htmlspecialchars_decode?
------------------------------------------------------------------------
[2015-06-23 09:01:32] yohgaki@php.net
Description:
------------
htmlspecialchars/htmlentities only accepts string to be escaped.
Accept array and escape all elements when array is passed to them.
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=69908&edit=1