]> git.mjollnir.org Git - moodle.git/commitdiff
ALL LANGUAGE EDITORS PLEASE NOTICE THIS CHECKIN
authormoodler <moodler>
Fri, 22 Nov 2002 17:27:56 +0000 (17:27 +0000)
committermoodler <moodler>
Fri, 22 Nov 2002 17:27:56 +0000 (17:27 +0000)
I've changed htmlentities to htmlspecialchars in this file, to fix
bugs with editing multibyte languages (ie Japanese).  Please be
cautious and let me know if this causes any problems when editing
your language (it shouldn't, but I don't want to spoil your day!)

admin/lang.php

index 8c10772177a087570d06f5e0283103edfd72bdd9..e2626056b19638f095331b290e2e4c4bc947ac14 100644 (file)
@@ -87,7 +87,7 @@
             $first = true;
             foreach ($enstring as $key => $value) {
                 if (!isset($string[$key])) {
-                    $value = htmlentities($value);
+                    $value = htmlspecialchars($value);
                     $value = str_replace("$"."a", "\\$"."a", $value);
                     if ($first) {
                         echo "</PRE><HR><P><B>".get_string("stringsnotset","","$langdir/$file")."</B></P><PRE>";
             }
             echo "<TABLE WIDTH=\"100%\" CELLPADDING=2 CELLSPACING=3 BORDER=0>";
             foreach ($enstring as $key => $envalue) {
-                $envalue = nl2br(htmlentities($envalue));
+                $envalue = nl2br(htmlspecialchars($envalue));
                 $envalue = str_replace("\$a","<B>\$a</B>", $envalue);  // Make variables bold
                 // TODO:  It would be nice if all the $a->something variables were bold too
 
                 echo "<TD WIDTH=40% BGCOLOR=\"$THEME->cellheading\" VALIGN=TOP>$envalue</TD>";
 
                 $value = str_replace("\\","",$string[$key]);          // Delete all slashes
-                $value = htmlentities($value);
+                $value = htmlspecialchars($value);
                 if ($editable) {
                     echo "<TD WIDTH=40% VALIGN=TOP>";
                     if (isset($string[$key])) {