english/libraries/joomla/filter/filteroutput.php
/**
	* Cleans text of all formating and scripting code
	*
	* @param     string   &$text   Text to clean
	*
	* @return    string   Cleaned text.
	* @since   11.1
	*/
Cleans text of all formating and scripting code
@param     string   &$text   Text to clean

@return    string   Cleaned text.
Cleans text of all formating and scripting code @param string &$text Text to clean @return string Cleaned text .
public static function cleanText (&$text)
	{
		$text = preg_replace("'<script[^>]*>.*?</script>'si", '', $text);
		$text = preg_replace('/<a\s+.*?href="([^"]+)"[^>]*>([^<]+)<\/a>/is', '\2 (\1)', $text);
		$text = preg_replace('/<!--.+?-->/', '', $text);
		$text = preg_replace('/{.+?}/', '', $text);
		$text = preg_replace('/&nbsp;/', ' ', $text);
		$text = preg_replace('/&amp;/', ' ', $text);
		$text = preg_replace('/&quot;/', ' ', $text);
		$text = strip_tags($text);
		$text = htmlspecialchars($text, ENT_COMPAT, 'UTF-8');
		return $text;
	}
public static function cleanText ( & $ text ) { $ text = preg_replace ( " '<script[^>]*>.*?</script>'si " , '' , $ text ) ; $ text = preg_replace ( '/<a\s+.*?href="([^"]+)"[^>]*>([^<]+)<\/a>/is' , '\2 (\1)' , $ text ) ; $ text = preg_replace ( '/<!--.+?-->/' , '' , $ text ) ; $ text = preg_replace ( '/{.+?}/' , '' , $ text ) ; $ text = preg_replace ( '/&nbsp;/' , ' ' , $ text ) ; $ text = preg_replace ( '/&amp;/' , ' ' , $ text ) ; $ text = preg_replace ( '/&quot;/' , ' ' , $ text ) ; $ text = strip_tags ( $ text ) ; $ text = htmlspecialchars ( $ text , ENT_COMPAT , 'UTF-8' ) ; return $ text ; }
Cleans text of all formating and scripting code
 @param     string   &$text   Text to clean
Cleans text of all formating and scripting code @param string &$text Text to clean