Actions
Bug #77722
closedabsRefPrefix is not applied everywhere
Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Frontend
Target version:
-
Start date:
2016-08-31
Due date:
% Done:
0%
Estimated time:
TYPO3 Version:
6.2
PHP Version:
Tags:
Complexity:
Is Regression:
No
Sprint Focus:
Description
When I've set absRefPrefix, it is not set everywhere. One example is the srcset-attribute:
<img src="fileadmin/example.png" srcset="fileadmin/example.png 200w, fileadmin/example_400.png 400w">
gets converted to
<img src="/fileadmin/example.png" srcset="/fileadmin/example.png 200w, fileadmin/example_400.png 400w">
(only the first fileadmin in the srcset got replaced)
This happens because TypoScriptFrontendController::setAbsRefPrefix() just searches for "fileadmin as a simplification of finding attributes which start with a relative path.
One improvement would be to add the absRefPrefix in the getPublicUrl() method of ResourceStorage, if relativeToCurrentScript is false:
https://github.com/TYPO3/TYPO3.CMS/blob/84865ff97f567d412bf5b5cad4bc57aefaff3747/typo3/sysext/core/Classes/Resource/ResourceStorage.php#L1310
Then images which are used within srcset will already have the correct path. Of course this does not fix all missing prefixes, but at least all where FAL is used.
Actions