Actions
Bug #92051
closedf:asset.script breaks ampersands and thus functionality
Status:
Closed
Priority:
Should have
Assignee:
-
Category:
-
Target version:
-
Start date:
2020-08-19
Due date:
% Done:
0%
Estimated time:
TYPO3 Version:
10
PHP Version:
7.2
Tags:
Complexity:
Is Regression:
Sprint Focus:
Description
Adding this code:
<f:asset.script identifier="googleApi" src="https://maps.googleapis.com/maps/api/js?key=API_KEY&libraries=places" />
results in a frontend output:
<script src="https://maps.googleapis.com/maps/api/js?key=API_KEY&amp;libraries=places"></script>
The original ampersand is already converted when added to the AssetCollector, which is correct, I suppose but then again htmlspecialchar'd in AssetRenderer.php in line 105 through the implodeAttributes function which results in the double manipulation of the ampersand:
$attributesString = count($attributes) ? ' ' . GeneralUtility::implodeAttributes($attributes, true) : '';
If I set the second parameter to false, it works.
Actions