Re: ENT_COMPAT for htmlentities and htmlspecialchars
| From: | Craig Francis | Date: | Wed, 06 Jan 2021 19:16:57 +0000 |
| Subject: | Re: ENT_COMPAT for htmlentities and htmlspecialchars | ||
| References: | 1 2 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-112787@lists.php.net to get a copy of this message | ||
On Wed, 6 Jan 2021 at 15:46, Nikita Popov <nikita.ppv@gmail.com> wrote:
> On Sat, Dec 26, 2020 at 12:03 PM Craig Francis <craig@craigfrancis.co.uk>
> wrote:
>
>> Hi,
>>
>> Could htmlspecialchars() use ENT_QUOTES by default?
>>
>> [...]
>
>
> I agree that we should switch the default to ENT_QUOTES. I also agree that
> we should enable ENT_SUBSTITUTE by default. I don't see any downside to
> these two options.
>
> Would you like to submit a PR?
>
Thanks Nikita,
I've submitted a PR, I think it follows the Coding Standards, and I've got
the tests passing, but feel free to edit/delete if it's not right.
https://github.com/php/php-src/pull/6583
If this is accepted, I can also look at the documentation updates.
Craig