diff --git a/htdocs/core/class/doleditor.class.php b/htdocs/core/class/doleditor.class.php
index 6dc726b084e..0433d7799c4 100644
--- a/htdocs/core/class/doleditor.class.php
+++ b/htdocs/core/class/doleditor.class.php
@@ -43,6 +43,7 @@ class DolEditor
var $height;
var $width;
var $readonly;
+ var $allowed_content;
/**
@@ -62,8 +63,9 @@ class DolEditor
* @param int $rows Size of rows for textarea tool
* @param int $cols Size of cols for textarea tool (textarea number of cols or %)
* @param int $readonly 0=Read/Edit, 1=Read only
+ * @param int $allowed_content 0=filter input text, 1=render as it is
*/
- function __construct($htmlname,$content,$width='',$height=200,$toolbarname='Basic',$toolbarlocation='In',$toolbarstartexpanded=false,$uselocalbrowser=true,$okforextendededitor=true,$rows=0,$cols=0,$readonly=0)
+ function __construct($htmlname,$content,$width='',$height=200,$toolbarname='Basic',$toolbarlocation='In',$toolbarstartexpanded=false,$uselocalbrowser=true,$okforextendededitor=true,$rows=0,$cols=0,$readonly=0,$allowed_content=0)
{
global $conf,$langs;
@@ -132,6 +134,7 @@ class DolEditor
$this->cols = (preg_match('/%/',$cols)?$cols:max(40,$cols)); // If $cols is a percent, we keep it, otherwise, we take max
$this->height = $height;
$this->width = $width;
+ $this->allowed_content = $allowed_content;
}
}
@@ -163,16 +166,14 @@ class DolEditor
$out.= '';
-
if ($this->tool == 'ckeditor')
{
if (! defined('REQUIRE_CKEDITOR')) define('REQUIRE_CKEDITOR','1');
//$skin='kama';
$skin='moono'; // default with cdeditor 4
-
+
$htmlencode_force=preg_match('/_encoded$/',$this->toolbarname)?'true':'false';
-
$out.= '