static function ToHtml($string, HtmlQuoteMode $mode = null)
    {
        self::InitEncoding();
        if (!$mode)
            $mode = HtmlQuoteMode::DoubleQuotes();
                
        return htmlspecialchars($string, $mode->Flag(), self::GetEncoding()->Code());
    }
static function ToHtml($string, HtmlQuoteMode $mode = null)
    {
        self::InitEncoding();
        if (!$mode)
            $mode = HtmlQuoteMode::DoubleQuotes();
                
        return htmlspecialchars($string, $mode->Flag(), self::GetEncoding()->Code());
    }
static function ToHtml ( $ string , HtmlQuoteMode $ mode = null ) { self :: InitEncoding ( ) ; if ( ! $ mode ) $ mode = HtmlQuoteMode :: DoubleQuotes ( ) ; return htmlspecialchars ( $ string , $ mode -> Flag ( ) , self :: GetEncoding ( ) -> Code ( ) ) ; }
Escapes special chars.
@param string $string
@param HtmlQuoteMode $mode If omitted, only double quotes are encoded.
@return string
Escapes special chars .