Generators: add tests for handling <standard> element + use consistent encoding cross-PHP #717
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Generators: add tests for handling element
This adds dedicated tests for specific issues which can be encountered in a
<standard>
XML element.This initial set of tests for this documents the current behaviour. This behaviour may not always be the desired behaviour, in which case, this will be fixed in follow-up commits.
Generators HTML/Markdown: consistent encoding cross-PHP
The default value for the
$flags
parameter of thehtmlspecialchars()
function changed in PHP 8.1.0.Previously, the default was
ENT_COMPAT
. Now the default isENT_QUOTES | ENT_SUBSTITUTE | ENT_HTML401
.The most notable differences are:
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.
Suggested changelog entry
N/A
Related issues/external references
This PR is part of a series of PRs which will add a complete set of tests for the Generator feature.
Related to #146