Released v5.9.2

This commit is contained in:
jos 2017-07-13 21:02:38 +02:00
parent 524d00e15e
commit f6e699e4cc
8 changed files with 35 additions and 34 deletions

View File

@ -3,6 +3,11 @@
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
- `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
*
* @author Jos de Jong, <wjosdejong@gmail.com>
* @version 5.9.1
* @version 5.9.2
* @date 2017-07-13
*/
(function webpackUniversalModuleDefinition(root, factory) {
@ -2204,28 +2204,26 @@ return /******/ (function(modules) { // webpackBootstrap
while (i < jsString.length && c !== quote) {
if (c === '"' && prev() !== '\\') {
// unescaped double quote, escape it
chars.push('\\');
chars.push('\\"');
}
// replace unescaped control characters with escaped ones
if (controlChars.hasOwnProperty(c)) {
else if (controlChars.hasOwnProperty(c)) {
// replace unescaped control characters with escaped ones
chars.push(controlChars[c])
i++;
c = curr();
}
// handle escape character
if (c === '\\') {
else if (c === '\\') {
// remove the escape character when followed by a single quote ', not needed
i++;
c = curr();
// remove the escape character when followed by a single quote ', not needed
if (c !== '\'') {
chars.push('\\');
}
chars.push(c);
}
else {
// regular character
chars.push(c);
}
chars.push(c);
i++;
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
*
* @author Jos de Jong, <wjosdejong@gmail.com>
* @version 5.9.1
* @version 5.9.2
* @date 2017-07-13
*/
(function webpackUniversalModuleDefinition(root, factory) {
@ -10180,28 +10180,26 @@ return /******/ (function(modules) { // webpackBootstrap
while (i < jsString.length && c !== quote) {
if (c === '"' && prev() !== '\\') {
// unescaped double quote, escape it
chars.push('\\');
chars.push('\\"');
}
// replace unescaped control characters with escaped ones
if (controlChars.hasOwnProperty(c)) {
else if (controlChars.hasOwnProperty(c)) {
// replace unescaped control characters with escaped ones
chars.push(controlChars[c])
i++;
c = curr();
}
// handle escape character
if (c === '\\') {
else if (c === '\\') {
// remove the escape character when followed by a single quote ', not needed
i++;
c = curr();
// remove the escape character when followed by a single quote ', not needed
if (c !== '\'') {
chars.push('\\');
}
chars.push(c);
}
else {
// regular character
chars.push(c);
}
chars.push(c);
i++;
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",
"version": "5.9.1",
"version": "5.9.2",
"main": "./index",
"description": "A web-based tool to view, edit, format, and validate JSON",
"tags": [