fix PHP Warning: preg_replace(): Compilation failed: invalid range in character class

This commit is contained in:
Ralf Becker 2019-06-06 08:59:51 +02:00
parent bde2561d58
commit 132cad6ee8

View File

@ -47,7 +47,7 @@ class Html
// First match things beginning with http:// (or other protocols)
$optBracket0 = '(<|&lt;)';
$Protocol = '(http:\/\/|(ftp:\/\/|https:\/\/))'; // only http:// gets removed, other protocolls are shown
$Domain = '([\w-]+\.[\w-.]+)';
$Domain = '([\w-]+\.[\w\-.]+)';
$Subdir = '([\w\-\.,@?^=%&;:\/~\+#]*[\w\-\@?^=%&\/~\+#])?';
$optBracket = '(>|&gt;)';
$Expr = '/' .$optBracket0. $NotAnchor . $Protocol . $Domain . $Subdir . $optBracket . '/i';