thomascube
2010-04-01 1d773d71414316e0b9836a15c35576593427ee21
program/include/rcube_string_replacer.php
@@ -15,7 +15,7 @@
 | Author: Thomas Bruederli <roundcube@gmail.com>                        |
 +-----------------------------------------------------------------------+
 $Id:  $
 $Id$
*/
@@ -39,7 +39,7 @@
    $url_chars_within = '\?\.~,!';
    $this->link_pattern = "/([\w]+:\/\/|\Wwww\.)([a-z0-9\-\.]+[a-z]{2,4}([$url_chars$url_chars_within]*[$url_chars])?)/i";
    $this->mailto_pattern = "/([a-z0-9][a-z0-9\-\.\+\_]*@[a-z0-9]([a-z0-9\-][.]?)*[a-z0-9]\\.[a-z]{2,5})/i";
    $this->mailto_pattern = "/([a-z0-9][a-z0-9\-\.\+\_]*@([a-z0-9]([-a-z0-9]*[a-z0-9])?\\.)+[a-z]{2,5})/i";
  }
  /**
@@ -74,7 +74,7 @@
    $i = -1;
    $scheme = strtolower($matches[1]);
    if (preg_match('!^(http||ftp|file)s?://!', $scheme)) {
    if (preg_match('!^(http|ftp|file)s?://!', $scheme)) {
      $url = $matches[1] . $matches[2];
      $i = $this->add(html::a(array('href' => $url, 'target' => '_blank'), Q($url)));
    }