protected function escapeLiteral($text, $context)
	{
		if ($context === 'raw')
		{
			return $text;
		}

		$escapeMode = ($context === 'attribute') ? ENT_COMPAT : ENT_NOQUOTES;

		return htmlspecialchars($text, $escapeMode);
	}
protected function escapeLiteral($text, $context)
	{
		if ($context === 'raw')
		{
			return $text;
		}

		$escapeMode = ($context === 'attribute') ? ENT_COMPAT : ENT_NOQUOTES;

		return htmlspecialchars($text, $escapeMode);
	}
protected function escapeLiteral ( $ text , $ context ) { if ( $ context === 'raw' ) { return $ text ; } $ escapeMode = ( $ context === 'attribute' ) ? ENT_COMPAT : ENT_NOQUOTES ; return htmlspecialchars ( $ text , $ escapeMode ) ; }
Escape given literal

@param  string $text    Literal
@param  string $context Either "raw", "text" or "attribute"
@return string          Escaped literal
Escape given literal