Fixed #268: JSONEditor now trims text in fields and values

This commit is contained in:
jos 2016-03-08 20:09:43 +01:00
parent 898747b403
commit 61c6f21f90
2 changed files with 6 additions and 1 deletions

View File

@ -3,6 +3,11 @@
https://github.com/josdejong/jsoneditor https://github.com/josdejong/jsoneditor
## not yet released, version 5.2.0
- Fixed #268: JSONEditor now trims text in fields and values.
## 2016-02-15, version 5.1.5 ## 2016-02-15, version 5.1.5
- Fixed #272: Checkbox for boolean values visible in view mode. - Fixed #272: Checkbox for boolean values visible in view mode.

View File

@ -3344,7 +3344,7 @@ Node.prototype._escapeHTML = function (text) {
* @private * @private
*/ */
Node.prototype._unescapeHTML = function (escapedText) { Node.prototype._unescapeHTML = function (escapedText) {
var json = '"' + this._escapeJSON(escapedText) + '"'; var json = '"' + this._escapeJSON(escapedText.trim()) + '"';
var htmlEscaped = util.parse(json); var htmlEscaped = util.parse(json);
return htmlEscaped return htmlEscaped