diff --git a/htdocs/core/class/doleditor.class.php b/htdocs/core/class/doleditor.class.php index eaf72ffff71..38c03a7330d 100644 --- a/htdocs/core/class/doleditor.class.php +++ b/htdocs/core/class/doleditor.class.php @@ -63,7 +63,7 @@ class DolEditor * @param string $cols Size of cols for textarea tool (textarea number of cols '70' or percent 'x%') * @param int $readonly 0=Read/Edit, 1=Read only */ - 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) { global $conf,$langs; @@ -121,7 +121,7 @@ class DolEditor $this->editor->Config['SkinPath'] = DOL_URL_ROOT.'/theme/'.$conf->theme.'/fckeditor/'; } } - +var_dump($content);exit; // Define some properties if (in_array($this->tool,array('textarea','ckeditor','ace'))) { @@ -282,11 +282,10 @@ class DolEditor $out.= ($this->height?' height: '.$this->height.'px; ':''); //$out.=" min-height: 100px;"; $out.= '">'; - /*$out.= preg_replace(array('/^<\?php/','/\?>$/'), array('<?php','?>'), $this->content); */ - $out.= htmlentities($this->content); + $out.= htmlspecialchars($this->content); $out.= ''; $out.= ''; $out.= '