瀏覽代碼

Added LINK to the forbidden tag-list in magic HTML because it can contain
external stylesheets or other dangerous things.

In IE6 the included stylesheets messed up the layout of SM although the link
attribute only is permitted in the head section ??

stekkel 23 年之前
父節點
當前提交
17b75f0080
共有 1 個文件被更改,包括 3 次插入3 次删除
  1. 3 3
      functions/mime.php

+ 3 - 3
functions/mime.php

@@ -211,7 +211,6 @@ function listEntities ($message) {
   } 
   } 
 }
 }
 
 
-
 /* returns a $message object for a particular entity id */
 /* returns a $message object for a particular entity id */
 function getEntity ($message, $ent_id) {
 function getEntity ($message, $ent_id) {
     return $message->getEntity($ent_id);
     return $message->getEntity($ent_id);
@@ -286,7 +285,7 @@ function formatBody($imap_stream, $message, $color, $wrap_at, $ent_num, $id, $ma
            $show_html_default, $has_unsafe_images, $view_unsafe_images, $sort;
            $show_html_default, $has_unsafe_images, $view_unsafe_images, $sort;
 
 
     $has_unsafe_images= 0;
     $has_unsafe_images= 0;
-    
+    $body = '';
     $urlmailbox = urlencode($mailbox);
     $urlmailbox = urlencode($mailbox);
     $body_message = getEntity($message, $ent_num);
     $body_message = getEntity($message, $ent_num);
     if (($body_message->header->type0 == 'text') ||
     if (($body_message->header->type0 == 'text') ||
@@ -1435,7 +1434,8 @@ function magicHTML($body, $id, $message, $mailbox = 'INBOX'){
                       "meta",
                       "meta",
                       "html",
                       "html",
                       "head",
                       "head",
-                      "base"
+                      "base",
+                      "link"
                       );
                       );
 
 
     $rm_tags_with_content = Array(
     $rm_tags_with_content = Array(