Issue Bug Closed

#92051f:asset.script breaks ampersands and thus functionality

Raphael Zschorsch 08/19/20, 14:20 updated 06/24/23, 15:18

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;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.

Reviews 0

No change resolves or names this issue in its commit message, and no comment links one.