瀏覽代碼

improved email parsing in body of message a little bit (handles more exceptions)

Luke Ehresman 25 年之前
父節點
當前提交
f766c25473
共有 2 個文件被更改,包括 3 次插入1 次删除
  1. 2 0
      functions/i18n.php
  2. 1 1
      functions/url_parser.php

+ 2 - 0
functions/i18n.php

@@ -35,6 +35,8 @@
    $languages["it"]["CHARSET"] = "iso-8859-1";
    $languages["cs"]["NAME"]    = "Czech";
    $languages["cs"]["CHARSET"] = "iso-8859-2";
+   $languages["es"]["NAME"]    = "Spanish";
+   $languages["es"]["CHARSET"] = "iso-8859-1";
 
    // Decodes a string to the internal encoding from the given charset
    function charset_decode ($charset, $string) {

+ 1 - 1
functions/url_parser.php

@@ -27,7 +27,7 @@
          $body = eregi_replace ("([a-z]|[0-9]|_|\.|-)+\@([a-z]|[0-9]|_|-)+(\.([a-z]|[0-9]|_|-)+)*", "<a href=\"../src/compose.php?send_to=\\0\">\\0</a>", $body);
       }
       */
-      $body = eregi_replace ("([a-z]|[0-9]|_|\.|-)+\@([a-z]|[0-9]|_|-)+\.(\.|[a-z]|[0-9]|_|-)+", "<a href=\"../src/compose.php?send_to=\\0\">\\0</a>", $body); 
+      $body = eregi_replace ("([a-z]|[0-9]|_|\.|-)+\@([a-z]|[0-9]|_|-)+(\.([a-z]|[A-Z])|[a-z]|[0-9]|_|-)+", "<a href=\"../src/compose.php?send_to=\\0\">\\0</a>", $body); 
       return $body;
    }