From 5dbdfe4322008e6b849f2fd025ebdb70c7a1e177 Mon Sep 17 00:00:00 2001 From: Jos de Jong Date: Wed, 25 Aug 2021 15:05:40 +0200 Subject: [PATCH] Fix #1363: parsing error contains html caharacters --- src/js/ErrorTable.js | 2 +- src/scss/jsoneditor/_editor.scss | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/js/ErrorTable.js b/src/js/ErrorTable.js index 136005486..9769812fc 100644 --- a/src/js/ErrorTable.js +++ b/src/js/ErrorTable.js @@ -129,7 +129,7 @@ export class ErrorTable { const td4 = document.createElement('td') const pre = document.createElement('pre') - pre.appendChild(document.createTextNode(error.message)) + pre.appendChild(document.createTextNode(error.message.replace(/
/gi, '\n'))) td4.appendChild(pre) trEl.appendChild(td4) } diff --git a/src/scss/jsoneditor/_editor.scss b/src/scss/jsoneditor/_editor.scss index 3c89c46fb..75dce9de9 100644 --- a/src/scss/jsoneditor/_editor.scss +++ b/src/scss/jsoneditor/_editor.scss @@ -515,7 +515,7 @@ pre.jsoneditor-preview, vertical-align: middle; pre { margin: 0; - white-space: normal; + white-space: pre-wrap; } } tr {