Fixes #5587: json_encode is now used with JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE where it makes sense, also it is now default for Json::encode()

This commit is contained in:
Alexander Makarov
2014-10-19 18:50:27 +04:00
parent 6a794f6b1b
commit 48ec791e4a
16 changed files with 19 additions and 17 deletions

View File

@ -28,10 +28,10 @@ class BaseJson
* represented in terms of a [[JsExpression]] object.
* @param mixed $value the data to be encoded
* @param integer $options the encoding options. For more details please refer to
* <http://www.php.net/manual/en/function.json-encode.php>.
* <http://www.php.net/manual/en/function.json-encode.php>. Default is `JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE`.
* @return string the encoding result
*/
public static function encode($value, $options = 0)
public static function encode($value, $options = 320)
{
$expressions = [];
$value = static::processData($value, $expressions, uniqid());