diff --git a/phpgwapi/inc/class.html.inc.php b/phpgwapi/inc/class.html.inc.php index cc075d6ccc..0f876ef370 100644 --- a/phpgwapi/inc/class.html.inc.php +++ b/phpgwapi/inc/class.html.inc.php @@ -150,16 +150,16 @@ class html $content); // First match things beginning with http:// (or other protocols) - $Protocol = '(http|ftp|https):\/\/'; - $Domain = '([\w]+.[\w]+)'; + $Protocol = '(http:\/\/|(ftp:\/\/|https:\/\/))'; // only http:// gets removed, other protocolls are shown + $Domain = '([\w-]+\.[\w-.]+)'; $Subdir = '([\w\-\.,@?^=%&;:\/~\+#]*[\w\-\@?^=%&\/~\+#])?'; $Expr = '/' . $NotAnchor . $Protocol . $Domain . $Subdir . '/i'; - $result = preg_replace( $Expr, "$2$3", $result ); + $result = preg_replace( $Expr, "$2$3$4", $result ); // Now match things beginning with www. $NotHTTP = '(?