Released v5.9.2
This commit is contained in:
parent
524d00e15e
commit
f6e699e4cc
|
@ -3,6 +3,11 @@
|
||||||
https://github.com/josdejong/jsoneditor
|
https://github.com/josdejong/jsoneditor
|
||||||
|
|
||||||
|
|
||||||
|
## 2017-07-13, version 5.9.2
|
||||||
|
|
||||||
|
- Fixed a bug in the JSON sanitizer.
|
||||||
|
|
||||||
|
|
||||||
## 2017-07-13, version 5.9.1
|
## 2017-07-13, version 5.9.1
|
||||||
|
|
||||||
- `setText` method of tree mode now automatically sanitizes JSON input
|
- `setText` method of tree mode now automatically sanitizes JSON input
|
||||||
|
|
|
@ -24,7 +24,7 @@
|
||||||
* Copyright (c) 2011-2017 Jos de Jong, http://jsoneditoronline.org
|
* Copyright (c) 2011-2017 Jos de Jong, http://jsoneditoronline.org
|
||||||
*
|
*
|
||||||
* @author Jos de Jong, <wjosdejong@gmail.com>
|
* @author Jos de Jong, <wjosdejong@gmail.com>
|
||||||
* @version 5.9.1
|
* @version 5.9.2
|
||||||
* @date 2017-07-13
|
* @date 2017-07-13
|
||||||
*/
|
*/
|
||||||
(function webpackUniversalModuleDefinition(root, factory) {
|
(function webpackUniversalModuleDefinition(root, factory) {
|
||||||
|
@ -2204,28 +2204,26 @@ return /******/ (function(modules) { // webpackBootstrap
|
||||||
while (i < jsString.length && c !== quote) {
|
while (i < jsString.length && c !== quote) {
|
||||||
if (c === '"' && prev() !== '\\') {
|
if (c === '"' && prev() !== '\\') {
|
||||||
// unescaped double quote, escape it
|
// unescaped double quote, escape it
|
||||||
chars.push('\\');
|
chars.push('\\"');
|
||||||
}
|
}
|
||||||
|
else if (controlChars.hasOwnProperty(c)) {
|
||||||
// replace unescaped control characters with escaped ones
|
// replace unescaped control characters with escaped ones
|
||||||
if (controlChars.hasOwnProperty(c)) {
|
|
||||||
chars.push(controlChars[c])
|
chars.push(controlChars[c])
|
||||||
i++;
|
|
||||||
c = curr();
|
|
||||||
}
|
}
|
||||||
|
else if (c === '\\') {
|
||||||
// handle escape character
|
// remove the escape character when followed by a single quote ', not needed
|
||||||
if (c === '\\') {
|
|
||||||
i++;
|
i++;
|
||||||
c = curr();
|
c = curr();
|
||||||
|
|
||||||
// remove the escape character when followed by a single quote ', not needed
|
|
||||||
if (c !== '\'') {
|
if (c !== '\'') {
|
||||||
chars.push('\\');
|
chars.push('\\');
|
||||||
}
|
}
|
||||||
|
chars.push(c);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
// regular character
|
||||||
|
chars.push(c);
|
||||||
}
|
}
|
||||||
|
|
||||||
chars.push(c);
|
|
||||||
i++;
|
i++;
|
||||||
c = curr();
|
c = curr();
|
||||||
}
|
}
|
||||||
|
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -24,7 +24,7 @@
|
||||||
* Copyright (c) 2011-2017 Jos de Jong, http://jsoneditoronline.org
|
* Copyright (c) 2011-2017 Jos de Jong, http://jsoneditoronline.org
|
||||||
*
|
*
|
||||||
* @author Jos de Jong, <wjosdejong@gmail.com>
|
* @author Jos de Jong, <wjosdejong@gmail.com>
|
||||||
* @version 5.9.1
|
* @version 5.9.2
|
||||||
* @date 2017-07-13
|
* @date 2017-07-13
|
||||||
*/
|
*/
|
||||||
(function webpackUniversalModuleDefinition(root, factory) {
|
(function webpackUniversalModuleDefinition(root, factory) {
|
||||||
|
@ -10180,28 +10180,26 @@ return /******/ (function(modules) { // webpackBootstrap
|
||||||
while (i < jsString.length && c !== quote) {
|
while (i < jsString.length && c !== quote) {
|
||||||
if (c === '"' && prev() !== '\\') {
|
if (c === '"' && prev() !== '\\') {
|
||||||
// unescaped double quote, escape it
|
// unescaped double quote, escape it
|
||||||
chars.push('\\');
|
chars.push('\\"');
|
||||||
}
|
}
|
||||||
|
else if (controlChars.hasOwnProperty(c)) {
|
||||||
// replace unescaped control characters with escaped ones
|
// replace unescaped control characters with escaped ones
|
||||||
if (controlChars.hasOwnProperty(c)) {
|
|
||||||
chars.push(controlChars[c])
|
chars.push(controlChars[c])
|
||||||
i++;
|
|
||||||
c = curr();
|
|
||||||
}
|
}
|
||||||
|
else if (c === '\\') {
|
||||||
// handle escape character
|
// remove the escape character when followed by a single quote ', not needed
|
||||||
if (c === '\\') {
|
|
||||||
i++;
|
i++;
|
||||||
c = curr();
|
c = curr();
|
||||||
|
|
||||||
// remove the escape character when followed by a single quote ', not needed
|
|
||||||
if (c !== '\'') {
|
if (c !== '\'') {
|
||||||
chars.push('\\');
|
chars.push('\\');
|
||||||
}
|
}
|
||||||
|
chars.push(c);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
// regular character
|
||||||
|
chars.push(c);
|
||||||
}
|
}
|
||||||
|
|
||||||
chars.push(c);
|
|
||||||
i++;
|
i++;
|
||||||
c = curr();
|
c = curr();
|
||||||
}
|
}
|
||||||
|
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "jsoneditor",
|
"name": "jsoneditor",
|
||||||
"version": "5.9.1",
|
"version": "5.9.2",
|
||||||
"main": "./index",
|
"main": "./index",
|
||||||
"description": "A web-based tool to view, edit, format, and validate JSON",
|
"description": "A web-based tool to view, edit, format, and validate JSON",
|
||||||
"tags": [
|
"tags": [
|
||||||
|
|
Loading…
Reference in New Issue