[BUGFIX] Decode tag attributes during HTML parsing
When parsing HTML in parsefunc, we need to make sure that the attributes that are extracted for further processing are properly HTML decoded, as per definition they are encoded in the HTML being parsed. At the same time we revert a decode that was applied in ExternalUrlLinkBuilder, as this is the wrong place to handle HTML decoding, as the link builder is as well called with data from other contexts (TypoScript, data from link fields) that must not have the URL HTML encoded. This fix is required to allow email links to add subject and body arguments like: test@foo.test?subject=foo%20bar&body=baz and not have the ampersand in the url double encoded when generating links from RTE content. Additionally we need to properly encode the masked value for the JavaScript URI, to prevent browsers from url decoding wrong values. Releases: master, 9.5 Resolves: #89264 Related: #81625 Related: #80985 Change-Id: I3be2478df83cffc0dfe6af918eb224b4ee480b10 Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/61799 Tested-by:TYPO3com <noreply@typo3.com> Tested-by:
Daniel Goerz <daniel.goerz@posteo.de> Tested-by:
Benni Mack <benni@typo3.org> Reviewed-by:
Daniel Goerz <daniel.goerz@posteo.de> Reviewed-by:
Benni Mack <benni@typo3.org>
Showing
- typo3/sysext/core/Classes/Utility/GeneralUtility.php 1 addition, 1 deletiontypo3/sysext/core/Classes/Utility/GeneralUtility.php
- typo3/sysext/fluid/Tests/Unit/ViewHelpers/Link/EmailViewHelperTest.php 2 additions, 2 deletions...fluid/Tests/Unit/ViewHelpers/Link/EmailViewHelperTest.php
- typo3/sysext/frontend/Classes/ContentObject/ContentObjectRenderer.php 2 additions, 1 deletion.../frontend/Classes/ContentObject/ContentObjectRenderer.php
- typo3/sysext/frontend/Classes/Typolink/ExternalUrlLinkBuilder.php 1 addition, 1 deletion...sext/frontend/Classes/Typolink/ExternalUrlLinkBuilder.php
- typo3/sysext/frontend/Tests/Functional/ContentObject/ContentObjectRendererTest.php 1 addition, 1 deletion...ts/Functional/ContentObject/ContentObjectRendererTest.php
- typo3/sysext/frontend/Tests/Unit/ContentObject/ContentObjectRendererTest.php 14 additions, 4 deletions...nd/Tests/Unit/ContentObject/ContentObjectRendererTest.php
Please register or sign in to comment