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 '';
- echo '';
- echo ''.mb_convert_encoding($a_template['description'],'UTF-8',$charset).'';
+ echo '';
+ echo ''.s2($a_template['description']).'';
echo '';
echo htmlentities(file_get_contents(api_get_path(SYS_COURSE_PATH).$course['path'].'/document'.$document_path));
echo '';
echo '';
}
?>
-
-
+
+
@@ -98,8 +116,8 @@ $default_course_dir = api_get_path(WEB_CODE_PATH).'default_course_document/';
-
-
+
+
@@ -148,8 +166,8 @@ $default_course_dir = api_get_path(WEB_CODE_PATH).'default_course_document/';
]]>
-
-
+
+
@@ -189,8 +207,8 @@ $default_course_dir = api_get_path(WEB_CODE_PATH).'default_course_document/';
-
-
+
+
@@ -231,8 +249,8 @@ $default_course_dir = api_get_path(WEB_CODE_PATH).'default_course_document/';
-
-
+
+
@@ -284,8 +302,8 @@ $default_course_dir = api_get_path(WEB_CODE_PATH).'default_course_document/';
-
-
+
+
@@ -327,8 +345,8 @@ $default_course_dir = api_get_path(WEB_CODE_PATH).'default_course_document/';
-
-
+
+
@@ -357,8 +375,8 @@ $default_course_dir = api_get_path(WEB_CODE_PATH).'default_course_document/';
-
-
+
+
@@ -395,8 +413,8 @@ $default_course_dir = api_get_path(WEB_CODE_PATH).'default_course_document/';
-
-
+
+
@@ -427,8 +445,8 @@ $default_course_dir = api_get_path(WEB_CODE_PATH).'default_course_document/';
-
-
+
+
@@ -470,8 +488,8 @@ $default_course_dir = api_get_path(WEB_CODE_PATH).'default_course_document/';
-
-
+
+
@@ -539,8 +557,8 @@ $default_course_dir = api_get_path(WEB_CODE_PATH).'default_course_document/';
-
-
+
+
@@ -589,8 +607,8 @@ $default_course_dir = api_get_path(WEB_CODE_PATH).'default_course_document/';
-
-
+
+
@@ -660,8 +678,8 @@ $default_course_dir = api_get_path(WEB_CODE_PATH).'default_course_document/';
-
-
+
+
@@ -699,8 +717,8 @@ $default_course_dir = api_get_path(WEB_CODE_PATH).'default_course_document/';
-
-
+
+
@@ -771,8 +789,8 @@ $default_course_dir = api_get_path(WEB_CODE_PATH).'default_course_document/';
-
-
+
+
@@ -815,8 +833,8 @@ $default_course_dir = api_get_path(WEB_CODE_PATH).'default_course_document/';
-
-
+
+
@@ -876,8 +894,8 @@ $default_course_dir = api_get_path(WEB_CODE_PATH).'default_course_document/';
]]>
-
-
+
+