--- /var/www/sites/all/modules/menu_trim_bak/alpha2/menu_trim.module	2008-04-17 16:48:42.000000000 -0400
+++ /var/www/sites/all/modules/menu_trim/menu_trim.module	2008-04-19 11:02:39.000000000 -0400
@@ -220,7 +220,7 @@ function menu_trim_block($op = 'list', $
                   // Level verification                  if (count($trail) == $level) {
                     if ($limit) {
                       // Show the menu using the item as base                      $item = menu_get_item($mid);
-                      $data['subject'] = $item['title'];
+                      $data['subject'] = check_plain($item['title']);
                       $data['content'] = theme('menu_tree', $mid);
                       break;                    }
                     else {
@@ -230,14 +230,14 @@ function menu_trim_block($op = 'list', $
                   }
                   elseif (db_result(db_query("SELECT trim FROM {menu_trim} WHERE mid=%d", $mid))) {
                     // Show the menu using the item as base                    $item = menu_get_item($mid);
-                    $data['subject'] = $item['title'];
+                    $data['subject'] = check_plain($item['title']);
                     $data['content'] = theme('menu_tree', $mid);
                     break;                  }
                 }
                 // Apply minimum level if it wasn't a limit ; verify that no trailing items was marked and a level has been reached
                 if (!$data && isset($limit_mid, $limit_item)) { // Should have data if there was a limit so skip !$limit
                   // Show the menu using minimum level item as base
-                  $data['subject'] = $limit_item['title'];
+                  $data['subject'] = check_plain($limit_item['title']);
                   $data['content'] = theme('menu_tree', $limit_mid);
                 }
               }
@@ -245,7 +245,7 @@ function menu_trim_block($op = 'list', $
             else {
               // Trail verification : looking for an item marked trimmable or the level limit              while ($mid = array_pop($trail)) {                if (db_result(db_query("SELECT trim FROM {menu_trim} WHERE mid=%d", $mid))) {
                   // Show the menu using the item as base                  $item = menu_get_item($mid);
-                  $data['subject'] = $item['title'];
+                  $data['subject'] = check_plain($item['title']);
                   $data['content'] = theme('menu_tree', $mid);
                   break;
                 }
@@ -255,7 +255,7 @@ function menu_trim_block($op = 'list', $
           // Verify if is supposed to always show a menu and none has been set          if ($mode == MENU_TRIM_ENABLED_SHOW_MENU_ALWAYS && !$data) { 
             // Show the menu using root item as base
             $item = menu_get_item($delta);
-            $data['subject'] = $menu[$delta]['root_title'] ? $item['title'] : '';
+            $data['subject'] = $menu[$delta]['root_title'] ? check_plain($item['title']) : '';
             $data['content'] = theme('menu_tree', $delta);
           }
         }
