From 49493a2dcfb2cd1758b69b13d9006ead3be0e066 Mon Sep 17 00:00:00 2001 From: Lior Kaplan Date: Fri, 1 Jan 2016 19:19:27 +0200 Subject: Happy new year (Update copyright to 2016) --- ext/json/php_json.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'ext/json/php_json.h') diff --git a/ext/json/php_json.h b/ext/json/php_json.h index efd872b5f4..148232e8d7 100644 --- a/ext/json/php_json.h +++ b/ext/json/php_json.h @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2015 The PHP Group | + | Copyright (c) 1997-2016 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | -- cgit v1.2.1 From 104876dd8e3ddb5cb46971a8e1be100ba7d9b432 Mon Sep 17 00:00:00 2001 From: Eddie Kohler Date: Mon, 28 Dec 2015 19:05:09 -0500 Subject: json_encode: Escape U+2028 and U+2029 more often. These characters are illegal in Javascript, so leaving them unescaped is risky. The default encoder ($flags = 0) is fine, but the encoder with JSON_UNESCAPED_UNICODE flag is not. In case anyone wants the ability to leave these characters unescaped, provide JSON_UNESCAPED_LINE_TERMINATORS. --- ext/json/php_json.h | 1 + 1 file changed, 1 insertion(+) (limited to 'ext/json/php_json.h') diff --git a/ext/json/php_json.h b/ext/json/php_json.h index f1edc6c65a..d8bf0dfe9d 100644 --- a/ext/json/php_json.h +++ b/ext/json/php_json.h @@ -67,6 +67,7 @@ typedef enum { #define PHP_JSON_UNESCAPED_UNICODE (1<<8) #define PHP_JSON_PARTIAL_OUTPUT_ON_ERROR (1<<9) #define PHP_JSON_PRESERVE_ZERO_FRACTION (1<<10) +#define PHP_JSON_UNESCAPED_LINE_TERMINATORS (1<<11) /* json_decode() options */ #define PHP_JSON_OBJECT_AS_ARRAY (1<<0) -- cgit v1.2.1