From: Hypolite Petovan Date: Mon, 11 Mar 2019 18:37:56 +0000 (-0400) Subject: Remove new lines from domain name part of autolinker regular expression in Util\Strings X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=8f96e383a7a72de5619520672092cd6a110442d4;p=friendica.git Remove new lines from domain name part of autolinker regular expression in Util\Strings - Fixes issue where the autolinker would include the next paragraph is a pathless URL was followed by new lines. --- diff --git a/src/Util/Strings.php b/src/Util/Strings.php index 3edc9ba906..681edb1c87 100644 --- a/src/Util/Strings.php +++ b/src/Util/Strings.php @@ -358,17 +358,17 @@ class Strings return '@(?xi) (?]+ # Run of non-space, non-()<> - | # or - \(([^\s()<>]+|(\([^\s()<>]+\)))*\) # balanced parens, up to 2 levels - | # or - [^\s`!()\[\]{};:\'".,<>?«»“”‘’] # not a space or one of these punct chars + (?: # One or more: + [^\s()<>]+ # Run of non-space, non-()<> + | # or + \(([^\s()<>]+|(\([^\s()<>]+\)))*\) # balanced parens, up to 2 levels + | # or + [^\s`!()\[\]{};:\'".,<>?«»“”‘’] # not a space or one of these punct chars )* )@'; }