diff --git a/htdocs/core/class/doleditor.class.php b/htdocs/core/class/doleditor.class.php index 3bfcf9b781e..bca9555f379 100644 --- a/htdocs/core/class/doleditor.class.php +++ b/htdocs/core/class/doleditor.class.php @@ -140,21 +140,25 @@ class DolEditor * Output edit area inside the HTML stream. * Output depends on this->tool (fckeditor, ckeditor, textarea, ...) * - * @param int $noprint 1=Return HTML string instead of printing it to output - * @param string $morejs Add more js. For example: ".on( \'saveSnapshot\', function(e) { alert(\'ee\'); });" + * @param int $noprint 1=Return HTML string instead of printing it to output + * @param string $morejs Add more js. For example: ".on( \'saveSnapshot\', function(e) { alert(\'ee\'); });" + * @param boolean $disallowAnyContent Disallow to use any content. true=restrict to a predefined list of allowed elements. * @return void|string */ - function Create($noprint=0,$morejs='') + function Create($noprint=0,$morejs='',$disallowAnyContent=true) { global $conf,$langs; $fullpage=False; - $disallowAnyContent=empty($conf->global->FCKEDITOR_ALLOW_ANY_CONTENT); // Only predefined list of html tags are allowed - + if (isset($conf->global->FCKEDITOR_ALLOW_ANY_CONTENT)) + { + $disallowAnyContent=empty($conf->global->FCKEDITOR_ALLOW_ANY_CONTENT); // Only predefined list of html tags are allowed + } + $found=0; $out=''; - if ($this->tool == 'fckeditor') + if ($this->tool == 'fckeditor') // not used anymore { $found=1; $this->editor->Create(); @@ -179,6 +183,7 @@ class DolEditor $htmlencode_force=preg_match('/_encoded$/',$this->toolbarname)?'true':'false'; + $out.= ''."\n"; $out.= '