]> git.mxchange.org Git - mailer.git/commitdiff
De-referer now no longer de-refers own links, no more entities in text-only emails
authorRoland Häder <roland@mxchange.org>
Sat, 4 Oct 2008 14:19:17 +0000 (14:19 +0000)
committerRoland Häder <roland@mxchange.org>
Sat, 4 Oct 2008 14:19:17 +0000 (14:19 +0000)
inc/databases.php
inc/functions.php

index 036d840348e476c91f8ba7cf3238b41daac9a394..67ad3e79aafb6850137146c27f5610734e06a05a 100644 (file)
@@ -113,7 +113,7 @@ define('USAGE_BASE', "usage");
 define('SERVER_URL', "http://www.mxchange.org");
 
 // This current patch level
-define('CURR_SVN_REVISION', "448");
+define('CURR_SVN_REVISION', "449");
 
 // Take a prime number which is long (if you know a longer one please try it out!)
 define('_PRIME', 591623);
index d356add7d7f8d942edaad8693aad4c6faa212514..b6b212fb72ba2764fe1d9da321d660103f5b5bf2 100644 (file)
@@ -474,7 +474,7 @@ function SEND_RAW_EMAIL ($to, $subject, $msg, $from) {
                        $mail->WordWrap   = 70;
                        $mail->IsHTML(true);
                } else {
-                       $mail->Body       = $msg;
+                       $mail->Body       = html_entity_decode($msg);
                }
                $mail->AddAddress($to, "");
                $mail->AddReplyTo(WEBMASTER,MAIN_TITLE);
@@ -483,7 +483,7 @@ function SEND_RAW_EMAIL ($to, $subject, $msg, $from) {
                $mail->Send();
        } else {
                // Use legacy mail() command
-               @mail($to, $subject, $msg, $from);
+               @mail($to, $subject, html_entity_decode($msg), $from);
        }
 }
 //
@@ -591,7 +591,13 @@ function TRANSLATE_COMMA ($dotted, $cut=true) {
 
 //
 function DEREFERER ($URL) {
-       $URL = URL."/modules.php?module=loader&amp;url=".urlencode(base64_encode(gzcompress($URL)));
+       // Don't de-refer our own links!
+       if (substr($URL, 0, strlen(URL)) != URL) {
+               // De-refer this link
+               $URL = URL."/modules.php?module=loader&amp;url=".urlencode(base64_encode(gzcompress($URL)));
+       } // END - if
+
+       // Return link
        return $URL;
 }