From 0a7fa66b26e614f1a0ba77d457af36fdbcb11a8d Mon Sep 17 00:00:00 2001
From: Mariia Pukhliakova <mariia.pukhliakova@id.ethz.ch>
Date: Fri, 20 Dec 2019 14:46:58 +0100
Subject: [PATCH] SSDM-9053 fix parsing error for CKEditor

---
 .../1/as/webapps/eln-lims/html/js/util/FormUtil.js         | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/util/FormUtil.js b/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/util/FormUtil.js
index 4ad47cf6b24..b8828afebbd 100644
--- a/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/util/FormUtil.js
+++ b/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/util/FormUtil.js
@@ -887,6 +887,7 @@ this._getTextBox = function(id, alt, isRequired) {
                         })
                         .then( editor => {
                             if (value) {
+                                value = this.prepareValue(value);
                                 editor.setData(value);
                             }
 
@@ -900,11 +901,15 @@ this._getTextBox = function(id, alt, isRequired) {
                             CKEditorManager.addEditor($component.attr('id'), editor);
                         })
                         .catch(error => {
-                            console.error( error );
+                            Util.showError(error);
                         });
         }
 	}
 
+	this.prepareValue = function(value) {
+	    return value.replace(/&quot;/g, "\'");
+	}
+
 	this.activateRichTextProperties = function($component, componentOnChange, propertyType, value, isReadOnly) {
 		if(profile.isForcedDisableRTF(propertyType)) {
 			$component.change(function(event) {
-- 
GitLab