Fixed a glich that caused the 'Viewing message' line to show a strange colour when...
[squirrelmail.git] / functions / url_parser.php
index 560c837d0363ae73abf0ab4471409281a03020ed..301222e50a6fd540af1711b4c793fa9c10efba24 100644 (file)
@@ -1,4 +1,4 @@
-<?
+<?php
    /* URL Passing code to allow links from with in emails */
 
    $url_parser_php = true;
    }
 
    function parseEmail ($body) {
-      $body = eregi_replace ("([a-z]|[0-9]|_|\.)+\@([a-z]|[0-9]|_)+(.([a-z]|[0-9]|_)+)*", "<a href=\"mailto:\\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);
       return $body;
    }
 
    function parseUrl ($body) {
       #Possible ways a URL could finish.
 
-      $poss_ends=array(" ","\n","\r","<",".&nbsp","&nbsp");
+      $poss_ends=array(" ","\n","\r","<",">",".&nbsp","&nbsp");
       $done=False;
       while (!$done) {
          #Look for when a URL starts