]> Sergey Matveev's repositories - public-inbox.git/commitdiff
linkify: match '~' (tilde) in URLs
authorEric Wong <e@80x24.org>
Sun, 1 May 2016 01:47:10 +0000 (01:47 +0000)
committerEric Wong <e@80x24.org>
Sun, 1 May 2016 01:47:10 +0000 (01:47 +0000)
Tilde is common for some homepages: http://example.org/~user/
There's probably some other acceptable characters I'm missing.

lib/PublicInbox/Linkify.pm

index 4eddedd03646750783be13782bc8ce3cd63dced8..49ab311689751eacc704c292270abf93e6a03107 100644 (file)
@@ -17,7 +17,7 @@ use Digest::SHA qw/sha1_hex/;
 my $SALT = rand;
 my $LINK_RE = qr!\b((?:ftp|https?|nntp)://
                 [\@:\w\.-]+/
-                ?[\@\w\+\&\?\.\%\;/#=-]*)!x;
+                ?[~\@\w\+\&\?\.\%\;/#=-]*)!x;
 
 sub new { bless {}, shift }