public static function html($text, $options = [])
	{
		$config = self::_buildHtmlPurifierConfig($options);
		$htmlPurifierWhitelist  = $config->getHTMLDefinition(true);

		self::_addElementsToHtmlPurifierWhitelist($htmlPurifierWhitelist);
		self::_addAttributesToHtmlPurifierWhitelist($htmlPurifierWhitelist);

		$purifier = new \HTMLPurifier($config);

		return $purifier->purify($text);
	}
public static function html($text, $options = [])
	{
		$config = self::_buildHtmlPurifierConfig($options);
		$htmlPurifierWhitelist  = $config->getHTMLDefinition(true);

		self::_addElementsToHtmlPurifierWhitelist($htmlPurifierWhitelist);
		self::_addAttributesToHtmlPurifierWhitelist($htmlPurifierWhitelist);

		$purifier = new \HTMLPurifier($config);

		return $purifier->purify($text);
	}
public static function html ( $ text , $ options = [ ] ) { $ config = self :: _buildHtmlPurifierConfig ( $ options ) ; $ htmlPurifierWhitelist = $ config -> getHTMLDefinition ( true ) ; self :: _addElementsToHtmlPurifierWhitelist ( $ htmlPurifierWhitelist ) ; self :: _addAttributesToHtmlPurifierWhitelist ( $ htmlPurifierWhitelist ) ; $ purifier = new \ HTMLPurifier ( $ config ) ; return $ purifier -> purify ( $ text ) ; }
Run HTML through a purifier

@param   string  $text     Text to clean
@param   array   $options  Array of key => value pairs
@return  string
Run HTML through a purifier