src/Helpers/Request/HtmlHelper.php
public function encode($content, $doubleEncode = true, $encoding = null)
    {
        $this->ensureTranslated($content);
        return $this->proxyWithCharset(__FUNCTION__, [$content, $doubleEncode, $encoding]);
    }
public function encode($content, $doubleEncode = true, $encoding = null)
    {
        $this->ensureTranslated($content);
        return $this->proxyWithCharset(__FUNCTION__, [$content, $doubleEncode, $encoding]);
    }
Encodes special characters into HTML entities.
The [[\Reaction\RequestApplicationInterface::charset|application 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.
@param string $encoding
@return string the encoded content
@see decode()
@see Html::encode()
@see http://www.php.net/manual/en/function.htmlspecialchars.php