diff --git a/src/Chamilo/CoreBundle/Component/Editor/CkEditor/CkEditor.php b/src/Chamilo/CoreBundle/Component/Editor/CkEditor/CkEditor.php index 9989cf2f52..f32ce0c300 100644 --- a/src/Chamilo/CoreBundle/Component/Editor/CkEditor/CkEditor.php +++ b/src/Chamilo/CoreBundle/Component/Editor/CkEditor/CkEditor.php @@ -60,10 +60,15 @@ class CkEditor extends Editor { $style = ''; - if (trim($value) == '' || - trim($value) == '' || - $value == '' - ) { + $value = trim($value); + + $defaultValues = [0 => '']; + $defaultValues[1] = ''; + $defaultValues[2] = ''.$defaultValues[1]; + $defaultValues[3] = htmlentities($defaultValues[1]); + $defaultValues[4] = htmlentities($defaultValues[2]); + + if (in_array($value, $defaultValues)) { $style = api_get_css_asset('bootstrap/dist/css/bootstrap.min.css'); $style .= api_get_css_asset('fontawesome/css/font-awesome.min.css'); $style .= api_get_css(ChamiloApi::getEditorDocStylePath());