Skip to content
Snippets Groups Projects
Commit 0a88047c authored by Stefan Bürk's avatar Stefan Bürk Committed by Oliver Bartsch
Browse files

[BUGFIX] Use proper flags for htmlspecialchars() in "View Documentation"

PHP8.1 changed the defaults for the second argument '$flags' from
'ENT_COMPAT' to 'ENT_QUOTES | ENT_SUBSTITUTE', which changes the
behaviour if that argument was not specified. In general this is a
good change, thus leaving it unspecified and live with the stricter
default was considered as the way to go in general.

However, in the specific case for rendering the ReST files of the
changelog and view it in the install tool this change now displays
weired and malformed documentation. To mitigate this, this patch
sets explicitly the second argument to 'ENT_COMPAT | ENT_SUBSTITUTE'
to restore the old behaviour but take malformed away for preparing
the documentation content.

See: https://github.com/php/php-src/blob/85b669e56583ee5d536168db7aaffbebe9d1aff2/UPGRADING#L166

Resolves: #97073
Releases: main, 11.5
Change-Id: I3e78ef1a218fe0f09ccbcf6f4b073cf5900d42c5
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/73757


Tested-by: default avatarChristian Kuhn <lolli@schwarzbu.ch>
Tested-by: default avatarcore-ci <typo3@b13.com>
Tested-by: default avatarOliver Bartsch <bo@cedev.de>
Reviewed-by: default avatarChristian Kuhn <lolli@schwarzbu.ch>
Reviewed-by: default avatarOliver Bartsch <bo@cedev.de>
parent af5a8c76
Branches
Tags
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment