App_CLI::encodeHtmlChars PHP Method

encodeHtmlChars() public method

By default does not encode already encoded ones.
public encodeHtmlChars ( string $s, integer $flags = null, string $encode = null, boolean $double_encode = false ) : string
$s string
$flags integer
$encode string
$double_encode boolean
return string
    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);
    }