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 45b4c2112c
commit 7928fb9f4a

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';