Project

General

Profile

Bug #93463

Updated by Georg Ringer about 3 years ago

TYPO3 9 / 10 

 Currently, undesired problems can occur with the absRefPrefix, which lead to HTML attributes being supplemented with the absRefPrefix "/", for example, although these attributes have nothing to do with URLs. 

 A client of mine (unfortunately) has a storage folder named / with the path "video" on the root level of the page. For this, the absRefPrefix is also set to "/".  
 This now leads to the fact that in the HTML output of the web page, every occurrence of "video/" in attributes is supplemented with a / at the beginning. For example, videos no longer work because the source tag then looks like this: 
 <source src="/fileadmin/test.mp4" type="/video/mp4"> instead of type="video/mp4" which means that the video no longer works. 

 Something similar would probably also happen with style or script tags with type="/text/javascript" if there were a storage folder with the name/path "text". 

 Therefore my recommendation: The function @\TYPO3\CMS\Frontend\Controller\TypoScriptFrontendController::setAbsRefPrefix@ for setting the absRefPrefix in the TSFE should be sensitised. The str_replace should be adjusted to only affect known attributes like src, href etc. For this, there could perhaps be another option in the install tool to give users the option of specifying other attributes that may be affected by the absRefPrefix.

Back