public function encodeHtmlChars($s, $flags = null, $encode = null, $double_encode = false)
    {
        if ($flags === null) {
            $flags = ENT_COMPAT;
        }
        if ($encode === null) {
            $encode = ini_get('default_charset') ?: 'UTF-8';
        }

        return htmlspecialchars($s, $flags, $encode, $double_encode);
    }
public function encodeHtmlChars($s, $flags = null, $encode = null, $double_encode = false)
    {
        if ($flags === null) {
            $flags = ENT_COMPAT;
        }
        if ($encode === null) {
            $encode = ini_get('default_charset') ?: 'UTF-8';
        }

        return htmlspecialchars($s, $flags, $encode, $double_encode);
    }
public function encodeHtmlChars ( $ s , $ flags = null , $ encode = null , $ double_encode = false ) { if ( $ flags === null ) { $ flags = ENT_COMPAT ; } if ( $ encode === null ) { $ encode = ini_get ( 'default_charset' ) ? : 'UTF-8' ; } return htmlspecialchars ( $ s , $ flags , $ encode , $ double_encode ) ; }
Encodes HTML special chars.
By default does not encode already encoded ones.

@param string $s
@param int    $flags
@param string $encode
@param bool   $double_encode

@return string
Encodes HTML special chars . By default does not encode already encoded ones .