alecpl
2009-07-11 713a66fc0fd824906517260c5323d4f8afc919b7
program/include/rcube_string_replacer.php
@@ -74,7 +74,7 @@
    $i = -1;
    $scheme = strtolower($matches[1]);
    if ($scheme == 'http://' || $scheme == 'https://' || $scheme == 'ftp://') {
    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)));
    }
@@ -83,7 +83,8 @@
      $i = $this->add($m[1] . html::a(array('href' => 'http://' . $url, 'target' => '_blank'), Q($url)));
    }
    return $i >= 0 ? $this->get_replacement($i) : '';
    // Return valid link for recognized schemes, otherwise, return the unmodified string for unrecognized schemes.
    return $i >= 0 ? $this->get_replacement($i) : $matches[0];
  }
  /**