* Fixed weird addressbook problem over SMTP
[squirrelmail.git] / functions / url_parser.php
index ad2fa4839e6c3b86d6838d8e151b6e69b65ad5a2..032ab167ee729b54d2d1b48f2353ddfc29928ede 100644 (file)
@@ -24,8 +24,9 @@
       // $IPMatch = '\[?' . $IPMatch . '(\.' . $IPMatch . '){3}\]?';
       //
       // Here's enough:
-      $IPMatch = '\[?[0-9]{1,3}(\.[0-9]{1,3}){3}\]?';
-      $Host = '(' . $IPMatch . '|[0-9a-z]([-.]?[0-9a-z])*\.[a-wyz][a-z](g|l|m|pa|t|u|v)?)';
+      $IPMatch = '\\[?[0-9]{1,3}(\\.[0-9]{1,3}){3}\\]?';
+      $Host = '(' . $IPMatch .
+'|[0-9a-z]([-.]?[0-9a-z])*\\.[a-wyz][a-z](fo|g|l|m|me|o|op|pa|ro|seum|t|u|v|z)?)';
       $Expression = '[0-9a-z]([-_.]?[0-9a-z])*(%' . $Host . ')?@' . $Host;
       
       /*
@@ -63,7 +64,7 @@
          'gopher://',
          'news://');
 
-      $poss_ends = array(' ', '\n', '\r', '<', '>', '.\r', '.\n', '.&nbsp;', 
+      $poss_ends = array(' ', "\n", "\r", '<', '>', ".\r", ".\n", '.&nbsp;', 
          '&nbsp;', ')', '(', '&quot;', '&lt;', '&gt;', '.<', ']', '[', '{', 
          '}', "\240");