tslib_prefixLocalAnchorsWithScript_requesturi_and_single_quotes_r4382.diff

Administrator Admin, 2008-10-29 15:56

Download (742 Bytes)

 
class.tslib_fe.php (Arbeitskopie)
4117 4117
	 * @return	void		Works directly on $this->content
4118 4118
	 */
4119 4119
	function prefixLocalAnchorsWithScript()	{
4120
		$scriptPath = substr(t3lib_div::getIndpEnv('TYPO3_REQUEST_URL'),strlen(t3lib_div::getIndpEnv('TYPO3_SITE_URL')));
4121
		$this->content = preg_replace('/(<(a|area).*?href=")(#[^"]*")/i','${1}' . htmlspecialchars($scriptPath) . '${3}',$this->content);
4120
		$this->content = preg_replace('/(<(?:a|area)\s[^>]*?\bhref\s*=\s*("|\'))(#[^\2]*\2)/is','${1}' . htmlspecialchars(t3lib_div::getIndpEnv('REQUEST_URI')) . '${3}',$this->content);
4122 4121
	}
4123 4122

  
4124 4123
	/**