You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The default value for the `$flags` parameter of the `htmlspecialchars()` function changed in PHP 8.1.0.
Previously, the default was `ENT_COMPAT`. Now the default is `ENT_QUOTES | ENT_SUBSTITUTE | ENT_HTML401`.
The most notable differences are:
* Single quotes will be encoded.
* Invalid code unit sequences will be replace by a Unicode Replacement Character.
For consistent output cross-version PHP, it is advised to always explicitly pass the `$flags` parameter` and not rely on the default value.
Fixed now and using the _new_ `$flags` default value as the parameter value.
This commit allows for the tests to have the same output expectations cross-version PHP. For end-users, the differences shouldn't have been noticeable.
0 commit comments