Browse Source

replace htmlentities() with htmlspecialchars() since it is broken with non iso-8859-1 8bit chars

alex-brainstorm 22 years ago
parent
commit
ed69168abe
2 changed files with 3 additions and 3 deletions
  1. 2 2
      src/folders.php
  2. 1 1
      src/search.php

+ 2 - 2
src/folders.php

@@ -265,7 +265,7 @@ if ($count_special_folders < count($boxes)) {
             ($boxes[$i]["unformatted"] != $draft_folder)) {
             $box = htmlspecialchars($boxes[$i]["unformatted-dm"]);
             $box2 = str_replace(' ', '&nbsp;',
-                                htmlentities(imap_utf7_decode_local($boxes[$i]["unformatted-disp"])));
+                                htmlspecialchars(imap_utf7_decode_local($boxes[$i]["unformatted-disp"])));
             echo "         <OPTION VALUE=\"$box\">$box2\n";
         }
     }
@@ -298,7 +298,7 @@ if(!$no_list_for_subscribe) {
     }
     if ($use_folder == true) {
         $box[$q] = htmlspecialchars($boxes_all[$i]['unformatted-dm']);
-        $box2[$q] = htmlentities(imap_utf7_decode_local($boxes_all[$i]['unformatted-disp']));
+        $box2[$q] = htmlspecialchars(imap_utf7_decode_local($boxes_all[$i]['unformatted-disp']));
         $q++;
     }
   }

+ 1 - 1
src/search.php

@@ -359,7 +359,7 @@ function asearch_get_query_display($color, $mailbox_array, $biop_array, $unop_ar
 					if ($what_type == 'adate')
 						$what_display = asearch_get_date_display($what);
 					else
-						$what_display = htmlentities($what);
+						$what_display = htmlspecialchars($what);
 					$what_display = ' <B>' . $what_display . '</B>';
 				}
 			}