Browse Source

Add htmlspecialchars as in textarea.php code fixes #1433

jmontoyaa 8 years ago
parent
commit
789c13a1e0
1 changed files with 2 additions and 2 deletions
  1. 2 2
      src/Chamilo/CoreBundle/Component/Editor/CkEditor/CkEditor.php

+ 2 - 2
src/Chamilo/CoreBundle/Component/Editor/CkEditor/CkEditor.php

@@ -66,7 +66,7 @@ class CkEditor extends Editor
         }
 
         $html = '<textarea id="'.$this->getName().'" name="'.$this->getName().'" class="ckeditor">
-                 '.$style.$this->value.'
+                 '.$style.htmlspecialchars($this->value, ENT_COMPAT).'
                  </textarea>';
         $html .= $this->editorReplace();
 
@@ -83,7 +83,7 @@ class CkEditor extends Editor
         $config = $toolbar->getConfig();
 
         $javascript = $this->toJavascript($config);
-        
+
         $html = "<script>
            CKEDITOR.replace('".$this->getName()."',
                $javascript