Bug #90933
closedAssetCollector does not allow protocol-relative URLs
100%
Description
In PageRenderer, this
page.includeJSFooter.gmaps = //maps.googleapis.com/maps/api/js
page.includeJSFooter.gmaps.external = 1
would be output as expected.
In AssetCollector, this
<f:asset.script identifier="gmaps" src="//maps.googleapis.com/maps/api/js" />
would lead to TYPO3 trying to build a local URL.
IMHO it could either be documented as unsupported (because hardly needed nowadays) or hardened a bit in this part:
https://github.com/TYPO3/TYPO3.CMS/blob/master/typo3/sysext/core/Classes/Page/AssetRenderer.php#L93
Protocol-relative:
https://en.wikipedia.org/wiki/URL#prurl
Rather unneeded:
https://stackoverflow.com/questions/28446314/why-use-protocol-relative-urls-at-all
Updated by Georg Ringer over 4 years ago
I would go for not allowing that and throw exception
Updated by Benni Mack over 4 years ago
I recommend allowing this and documenting this properly.
Updated by Christian Eßl over 4 years ago
Although I wouldn't recommend using protocol-relative urls, they are still a viable way to include urls in a html document, so I would support them.
Updated by Gerrit Code Review over 4 years ago
- Status changed from New to Under Review
Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/64069
Updated by Christian Eßl over 4 years ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset b6aaba1418112b54466dc0fd159fc380ca6adcfe.