Bug #19574 » anchorsWithAbsRefPrefixSupport.patch
typo3_src-4.2.2/typo3/sysext/cms/tslib/class.tslib_fe.php 2008-11-05 17:02:19.000000000 +0100 | ||
---|---|---|
* @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);
|
||
}
|
||