From 342c122b57d9d06737ac6bc8a15bb5db329f9599 Mon Sep 17 00:00:00 2001 From: Yannick Warnier Date: Sun, 25 May 2008 00:19:21 +0200 Subject: [PATCH] [svn r15389] Fix other character encoding problems, fixes the 'No templates' message problem - see FS#2589 --- main/inc/lib/fckeditor/fcktemplates.xml.php | 96 ++++++++++++--------- 1 file changed, 57 insertions(+), 39 deletions(-) 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 '