public static function htmlEncode($content, $doubleEncode = true)
    {
        $ci = & get_instance();
        
        return htmlspecialchars($content, ENT_QUOTES | ENT_SUBSTITUTE, $ci->config->item('charset') ? $ci->config->item('charset') : 'UTF-8', $doubleEncode);
    }
public static function htmlEncode($content, $doubleEncode = true)
    {
        $ci = & get_instance();
        
        return htmlspecialchars($content, ENT_QUOTES | ENT_SUBSTITUTE, $ci->config->item('charset') ? $ci->config->item('charset') : 'UTF-8', $doubleEncode);
    }
public static function htmlEncode ( $ content , $ doubleEncode = true ) { $ ci = & get_instance ( ) ; return htmlspecialchars ( $ content , ENT_QUOTES | ENT_SUBSTITUTE , $ ci -> config -> item ( 'charset' ) ? $ ci -> config -> item ( 'charset' ) : 'UTF-8' , $ doubleEncode ) ; }
Encodes special characters into HTML entities.

The [[$this->config->item('charset')]] will be used for encoding.

@param string $content the content to be encoded
@param bool $doubleEncode whether to encode HTML entities in `$content`. If false,
HTML entities in `$content` will not be further encoded.
@return string the encoded content

@see http://www.php.net/manual/en/function.htmlspecialchars.php
@see https://www.yiiframework.com/doc/api/2.0/yii-helpers-basehtml#encode()-detail
Encodes special characters into HTML entities .