Adding labels to other columns on message list for checkbox. STABLE admins, please...
[squirrelmail.git] / functions / mime.php
index 6262a417430af7e70c6a37479efec6dea053af59..c13a36681f58fd4bfff4ba001769691032613350 100644 (file)
@@ -516,7 +516,7 @@ function formatAttachments($message, $exclude_id, $mailbox, $id) {
             } else {
                 $attachments .= '  |  ';
             }
-            $attachments .= '<a href="' . $val['href'] . '">' .  $val['text'] . '</a>';
+            $attachments .= '<a href="' . $val['href'] . '">' . (isset($val['text']) && !empty($val['text']) ? $val['text'] : '') . (isset($val['extra']) && !empty($val['extra']) ? $val['extra'] : '') . '</a>';
         }
         unset($links);
         $attachments .= "</td></tr>\n";
@@ -1451,6 +1451,18 @@ function sq_fixatts($tagname,
                 }
             }
         }
+
+
+        /**
+         * Replace empty src tags with the blank image.  src is only used
+         * for frames, images, and image inputs.  Doing a replace should
+         * not affect them working as should be, however it will stop
+         * IE from being kicked off when src for img tags are not set
+         */
+        if (($attname == 'src') && ($attvalue == '""')) {
+            $attary{$attname} = '"' . SM_PATH . 'images/blank.png"';
+        }
+
         /**
         * Turn cid: urls into http-friendly ones.
         */
@@ -1597,7 +1609,7 @@ function sq_cid2http($message, $id, $cidurl, $mailbox){
          * If we couldn't generate a proper img url, drop in a blank image
          * instead of sending back empty, otherwise it causes unusual behaviour
          */
-        $httpurl = $quotechar . SM_PATH . 'images/blank.png';
+        $httpurl = $quotchar . SM_PATH . 'images/blank.png';
     }
  
     return $httpurl;
@@ -1981,6 +1993,11 @@ function magicHTML($body, $id, $message, $mailbox = 'INBOX') {
     if (preg_match("|$secremoveimg|i", $trusted)){
         $has_unsafe_images = true;
     }
+
+
+    // we want to parse mailto's and other URLs in HTML output too
+    parseUrl($trusted);
+
     return $trusted;
 }