]> git.mjollnir.org Git - moodle.git/commitdiff
weblib MDL-17550 Added code to convert arrows set in themes from entities to UTF8...
authorSam Hemelryk <sam@moodle.com>
Fri, 11 Dec 2009 02:05:39 +0000 (02:05 +0000)
committerSam Hemelryk <sam@moodle.com>
Fri, 11 Dec 2009 02:05:39 +0000 (02:05 +0000)
lib/weblib.php

index e993a751b790f851c50288f6e5b0d8b83b4e8809..37ee1ff265de226633e94dd219138333dda55398 100644 (file)
@@ -1924,6 +1924,7 @@ function check_theme_arrows() {
     global $THEME;
 
     if (!isset($THEME->rarrow) and !isset($THEME->larrow)) {
+        debug($THEME, 'not set');
         // Default, looks good in Win XP/IE 6, Win/Firefox 1.5, Win/Netscape 8...
         // Also OK in Win 9x/2K/IE 5.x
         $THEME->rarrow = '►'; // &#x25BA;
@@ -1958,6 +1959,13 @@ function check_theme_arrows() {
             $THEME->rarrow = $THEME->larrow;
             $THEME->larrow = $t;
         }
+    } else {
+        if (strpos($THEME->rarrow, '&')===0 && strrpos($THEME->rarrow, ';')===strlen($THEME->rarrow)-1) {
+            $THEME->rarrow = html_entity_decode($THEME->rarrow, ENT_QUOTES, 'utf-8');
+        }
+        if (strpos($THEME->larrow, '&')===0 && strrpos($THEME->larrow, ';')===strlen($THEME->larrow)-1) {
+            $THEME->larrow = html_entity_decode($THEME->larrow, ENT_QUOTES, 'utf-8');
+        }
     }
 }