From a0a440cf5f743fc592121698b300a302dd82ead4 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 29 May 2020 03:26:05 +0200 Subject: [PATCH] FIX Force of HTML content only for ckeditor --- htdocs/core/class/doleditor.class.php | 2 +- htdocs/modulebuilder/index.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/core/class/doleditor.class.php b/htdocs/core/class/doleditor.class.php index ff2012a5513..55474850b8e 100644 --- a/htdocs/core/class/doleditor.class.php +++ b/htdocs/core/class/doleditor.class.php @@ -88,7 +88,7 @@ class DolEditor // Define some properties if (in_array($this->tool, array('textarea', 'ckeditor', 'ace'))) { - if (! dol_textishtml($content) && $this->tool != 'textarea') { // We force content into HTML if we are using an advanced editor if content is not HTML. + if ($this->tool == 'ckeditor' && ! dol_textishtml($content)) { // We force content to be into HTML if we are using an advanced editor if content is not HTML. $this->content = dol_nl2br($content); } else { diff --git a/htdocs/modulebuilder/index.php b/htdocs/modulebuilder/index.php index 7c867cdf17a..f3e9ec9c190 100644 --- a/htdocs/modulebuilder/index.php +++ b/htdocs/modulebuilder/index.php @@ -1930,7 +1930,7 @@ if ($module == 'initmodule') } dol_fiche_end(); - } else { + } else { // Edit text file $fullpathoffile = dol_buildpath($file, 0, 1); // Description - level 2 if ($fullpathoffile)