Fix URLS with ! in query were not properly activated, leaving out part of the URL

This commit is contained in:
nathan 2022-11-23 09:45:38 -07:00
parent 0efe1e865f
commit 85ded6f1fc

View File

@ -62,7 +62,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\-.]+)';
$Subdir = '([\w\-\.,@?^=%&;:\/~\+#]*[\w\-\@?^=%&\/~\+#])?';
$Subdir = '([\w\-\.,@?^=%&!;:\/~\+#]*[\w\-\@?^=%&\/~\+#])?';
$optStuff = '("|&quot|;)?';
$Expr = '/' . $NotAnchor . $Protocol . $Domain . $Subdir . $optStuff . '/i';
// use preg_replace_callback as we experienced problems with https links