diff --git a/main/inc/lib/fckeditor/fcktemplates.xml.php b/main/inc/lib/fckeditor/fcktemplates.xml.php index 0a635952a5..dc66bc68f4 100644 --- a/main/inc/lib/fckeditor/fcktemplates.xml.php +++ b/main/inc/lib/fckeditor/fcktemplates.xml.php @@ -6,9 +6,27 @@ $IMConfig['base_url'] = $_configuration['root_web'].'main/img/gallery/'; function loadCSS($css_name) { $template_css = ' '; - $template_css=str_replace('images/',api_get_path(WEB_PATH).'main/css/'.$css_name.'/images/',$template_css); + $template_css = str_replace('images/',api_get_path(WEB_PATH).'main/css/'.$css_name.'/images/',$template_css); return $template_css; } +/** + * Transforms a language variable into XML-usable code + */ +function s($var) +{ + global $charset; + //return str_replace('&','&',mb_convert_encoding(get_lang($var),'UTF-8',$charset)); + return htmlentities(get_lang($var), ENT_NOQUOTES, $charset); +} +/** + * Transforms a string into XML-usable code + */ +function s2($var) +{ + global $charset; + //return str_replace('&','&',mb_convert_encoding($var,'UTF-8',$charset)); + return htmlentities($var, ENT_NOQUOTES, $charset); +} $css = loadCSS(api_get_setting('stylesheets')); $img_dir = api_get_path(WEB_IMG_PATH); $default_course_dir = api_get_path(WEB_CODE_PATH).'default_course_document/'; @@ -48,16 +66,16 @@ $default_course_dir = api_get_path(WEB_CODE_PATH).'default_course_document/'; imagejpeg($im, api_get_path(SYS_CODE_PATH).'upload/template_thumbnails/'.$a_template['id'].'.jpg'); */ //echo '