about summary refs log tree commit homepage
path: root/lib/PublicInbox/Linkify.pm
diff options
context:
space:
mode:
Diffstat (limited to 'lib/PublicInbox/Linkify.pm')
-rw-r--r--lib/PublicInbox/Linkify.pm5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/PublicInbox/Linkify.pm b/lib/PublicInbox/Linkify.pm
index d4df689e..ea7fd71f 100644
--- a/lib/PublicInbox/Linkify.pm
+++ b/lib/PublicInbox/Linkify.pm
@@ -17,7 +17,10 @@ use Digest::SHA qw/sha1_hex/;
 my $SALT = rand;
 my $LINK_RE = qr{\b((?:ftps?|https?|nntps?|gopher)://
                  [\@:\w\.-]+/
-                 ?[!,:~\$\@\w\+\&\?\.\%\;/#=-]*)}x;
+                 (?:[a-z0-9\-\._~!\$\&\';\(\)\*\+,;=:@/%]*)
+                 (?:\?[a-z0-9\-\._~!\$\&\';\(\)\*\+,;=:@/%]+)?
+                 (?:\#[a-z0-9\-\._~!\$\&\';\(\)\*\+,;=:@/%\?]+)?
+                 )}xi;
 
 sub new { bless {}, shift }