Can configure spool root
[banana.git] / banana / message.inc.php
index 295af5b..01686a1 100644 (file)
@@ -107,12 +107,9 @@ final class BananaMessage extends BananaMimePart
             return $rsl;
 
           case "subject":
-            $link = null;
             $text = stripslashes($text);
-            if (function_exists('hook_getSubject')) {
-                $link = hook_getSubject($text);
-            }
-            return banana_catchFormats($text) . $link;
+            $text = html_entities($text);
+            return banana_catchFormats($text);
 
           default:
             return $text;
@@ -231,11 +228,11 @@ final class BananaMessage extends BananaMimePart
         exit;
     }
 
-    public function getFormattedBody($type = null)
+    public function getFormattedBody(&$reqtype = null)
     {
         $types = Banana::$msgshow_mimeparts;
-        if (!is_null($type)) {
-            array_unshift($types, $type);
+        if (!is_null($reqtype)) {
+            array_unshift($types, $reqtype);
         }
         foreach ($types as $type) {
             @list($type, $subtype) = explode('/', $type);
@@ -243,6 +240,7 @@ final class BananaMessage extends BananaMimePart
             if (empty($parts)) {
                 continue;
             }
+            $reqtype = implode('/', $parts[0]->getType());
             return $parts[0]->toHtml();
         }
         return null;