yii\helpers\BaseJson::htmlEncode PHP 메소드

htmlEncode() 공개 정적인 메소드

The method enhances json_encode() by supporting JavaScript expressions. In particular, the method will not encode a JavaScript expression that is represented in terms of a [[JsExpression]] object.
부터: 2.0.4
public static htmlEncode ( mixed $value ) : string
$value mixed the data to be encoded
리턴 string the encoding result
    public static function htmlEncode($value)
    {
        return static::encode($value, JSON_UNESCAPED_UNICODE | JSON_HEX_QUOT | JSON_HEX_TAG | JSON_HEX_AMP | JSON_HEX_APOS);
    }