Released v5.9.2

This commit is contained in:
jos 2017-07-13 21:02:38 +02:00 committed by Meir Rotstein
parent a9e2f73089
commit 262b65fc6c
8 changed files with 35 additions and 34 deletions

View File

@ -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

View File

@ -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
dist/jsoneditor.js vendored
View File

@ -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();
} }

2
dist/jsoneditor.map vendored

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -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": [