From 0d62ec0906ebdb4e9358ccb1c0d41a30f20711cf Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Fri, 26 Jun 2020 23:26:18 +0000 Subject: linkify: support imap, imaps, news, and snews URIs Since we'll have an IMAP server released soon, maybe imaps:// and imap:// URLs can become popular. news:// is defined with nntp:// in RFC 5538, and we can at least support the news:// form in rendered HTML. snews:// may appear in old mail archives, too, so we'll attempt to support it in case clients do. --- lib/PublicInbox/Linkify.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/PublicInbox/Linkify.pm b/lib/PublicInbox/Linkify.pm index b85bedfe..a02eafc4 100644 --- a/lib/PublicInbox/Linkify.pm +++ b/lib/PublicInbox/Linkify.pm @@ -17,7 +17,7 @@ use PublicInbox::Hval qw(ascii_html mid_href); use PublicInbox::MID qw($MID_EXTRACT); my $SALT = rand; -my $LINK_RE = qr{([\('!])?\b((?:ftps?|https?|nntps?|gopher):// +my $LINK_RE = qr{([\('!])?\b((?:ftps?|https?|nntps?|imaps?|s?news|gopher):// [\@:\w\.-]+(?:/ (?:[a-z0-9\-\._~!\$\&\';\(\)\*\+,;=:@/%]*) (?:\?[a-z0-9\-\._~!\$\&\';\(\)\*\+,;=:@/%]+)? -- cgit v1.2.3-24-ge0c7