Commit 65d57b1
committed
Generators HTML/Markdown: consistent encoding cross-PHP
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.1 parent 3f33a50 commit 65d57b1
2 files changed
+2
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
235 | 235 | | |
236 | 236 | | |
237 | 237 | | |
238 | | - | |
| 238 | + | |
239 | 239 | | |
240 | 240 | | |
241 | 241 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
116 | 116 | | |
117 | 117 | | |
118 | 118 | | |
119 | | - | |
| 119 | + | |
120 | 120 | | |
121 | 121 | | |
122 | 122 | | |
| |||
0 commit comments