} 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";
}
}
}
+
+
+ /**
+ * 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.
*/
* 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;
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;
}