]> Sergey Matveev's repositories - public-inbox.git/commitdiff
linkify: allow '!' in URLs
authorEric Wong <e@80x24.org>
Sat, 2 Jul 2016 08:25:13 +0000 (08:25 +0000)
committerEric Wong <e@80x24.org>
Sat, 2 Jul 2016 08:25:46 +0000 (08:25 +0000)
GoogleGroups URLs often contain '!' in them

lib/PublicInbox/Linkify.pm

index 25f0b48a34d9b2329b97d857797476f474e7632a..d4df689e495ad8fd5babfec0989415c10a7e4ad3 100644 (file)
@@ -15,9 +15,9 @@ use warnings;
 use Digest::SHA qw/sha1_hex/;
 
 my $SALT = rand;
-my $LINK_RE = qr!\b((?:ftps?|https?|nntps?|gopher)://
+my $LINK_RE = qr{\b((?:ftps?|https?|nntps?|gopher)://
                 [\@:\w\.-]+/
-                ?[,:~\$\@\w\+\&\?\.\%\;/#=-]*)!x;
+                ?[!,:~\$\@\w\+\&\?\.\%\;/#=-]*)}x;
 
 sub new { bless {}, shift }