Project

General

Profile

Bug #19574 » typo3_9741.patch

Administrator Admin, 2008-11-12 12:56

View differences:

typo3/sysext/cms/tslib/class.tslib_fe.php (Arbeitskopie)
* @return void Works directly on $this->content
*/
function prefixLocalAnchorsWithScript() {
$scriptPath = substr(t3lib_div::getIndpEnv('TYPO3_REQUEST_URL'),strlen(t3lib_div::getIndpEnv('TYPO3_SITE_URL')));
$scriptPath = $GLOBALS['TSFE']->absRefPrefix . substr(t3lib_div::getIndpEnv('TYPO3_REQUEST_URL'), strlen(t3lib_div::getIndpEnv('TYPO3_SITE_URL')));
$this->content = preg_replace('/(<(a|area).*?href=")(#[^"]*")/i','${1}' . htmlspecialchars($scriptPath) . '${3}',$this->content);
}
typo3/sysext/cms/tslib/class.tslib_pagegen.php (Arbeitskopie)
if (!$type) $type = 'text/javascript';
$GLOBALS['TSFE']->content.='
<script src="'.htmlspecialchars($ss).'" type="'.htmlspecialchars($type).'"></script>';
<script src="' . htmlspecialchars($GLOBALS['TSFE']->absRefPrefix . $ss) . '" type="' . htmlspecialchars($type) . '"></script>';
}
}
}
(4-4/7)