mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-22 16:03:47 +01:00
fix unescaped dash in regular expression
This commit is contained in:
parent
fd9415dc58
commit
6f1590fcaf
@ -61,7 +61,7 @@ class Html
|
||||
{
|
||||
// First match things beginning with http:// (or other protocols)
|
||||
$Protocol = '(http:\/\/|(ftp:\/\/|https:\/\/))'; // only http:// gets removed, other protocolls are shown
|
||||
$Domain = '([\w-]+\.[\w-.]+)';
|
||||
$Domain = '([\w-]+\.[\w\-.]+)';
|
||||
$Subdir = '([\w\-\.,@?^=%&;:\/~\+#]*[\w\-\@?^=%&\/~\+#])?';
|
||||
$optStuff = '("|"|;)?';
|
||||
$Expr = '/' . $NotAnchor . $Protocol . $Domain . $Subdir . $optStuff . '/i';
|
||||
@ -92,7 +92,7 @@ class Html
|
||||
// Now match things beginning with www.
|
||||
$optBracket0 = '(<|<)?';
|
||||
$NotHTTP = '(?<!:\/\/|" target=\"_blank\">)'; // avoid running again on http://www links already handled above
|
||||
$Domain2 = 'www(\.[\w-.]+)';
|
||||
$Domain2 = 'www(\.[\w\-.]+)';
|
||||
$Subdir2 = '([\w\-\.,@?^=%&:\/~\+#]*[\w\-\@?^=%&\/~\+#])?';
|
||||
$optBracket = '(>|>|>|;)?';
|
||||
$Expr = '/' .$optBracket0. $NotAnchor . $NotHTTP . $Domain2 . $Subdir2 .$optBracket. '/i';
|
||||
|
Loading…
Reference in New Issue
Block a user