X-Git-Url: https://vcs.fsf.org/?p=squirrelmail.git;a=blobdiff_plain;f=functions%2Fmailbox.php;h=9092744d48cad7db4c440c5f72d202217c533c7d;hp=44ea499de34d6f33af0f8cc70fba90cb7691e57c;hb=31f3d7c03a7c155d48a955b4beb15105ba154086;hpb=8467bf0073db31214fb8643e06186c40821d9e1a
diff --git a/functions/mailbox.php b/functions/mailbox.php
index 44ea499d..9092744d 100644
--- a/functions/mailbox.php
+++ b/functions/mailbox.php
@@ -116,6 +116,16 @@
}
}
+ function decodeEmailAddr($sender) {
+ $emailAddr = getEmailAddr($sender);
+ $emailStart = strpos($emailAddr, "EMAILSTART--");
+ $emailEnd = strpos($emailAddr, "--EMAILEND") - 10;
+
+ $emailAddr = ereg_replace("EMAILSTART--", "", $emailAddr);
+ $emailAddr = ereg_replace("--EMAILEND", "", $emailAddr);
+ return $emailAddr;
+ }
+
function getEmailAddr($sender) {
if (strpos($sender, "EMAILSTART--") == false)
return "";
@@ -269,6 +279,7 @@
$wrap_at = 80; // Make this configurable int the config file some time
if (strlen($line) - 2 >= $wrap_at) // -2 because of the ^^ at the beginning
$line = wordWrap($line, $wrap_at);
+
$line = str_replace(" ", " ", $line);
$line = str_replace("\t", " ", $line);
@@ -289,7 +300,8 @@
"www" and "mailto" also. That should probably be added later. **/
if (strpos(strtolower($line), "http://") != false) {
$start = strpos(strtolower($line), "http://");
- $link = substr($line, $start, strlen($line));
+ $text = substr($line, $start, strlen($line));
+ $link = ereg_replace("
", "", $text);
if (strpos($link, "&"))
$end = strpos($link, "&");
@@ -299,8 +311,7 @@
$end = strlen($link);
$link = substr($link, 0, $end);
-
- $line = str_replace($link, "$link", $line);
+ $line = str_replace($text, "$text", $line);
}
return $line;