diff options
author | Eric Wong <e@80x24.org> | 2015-08-30 00:12:31 +0000 |
---|---|---|
committer | Eric Wong <e@80x24.org> | 2015-08-30 00:12:31 +0000 |
commit | f401be8bf5612178074d8d037776fee9e27bfd4c (patch) | |
tree | 5d36b24c89347cf21b25bf971ea95fb20f52cd7f | |
parent | 50e279d1b84f8cf69a5cffd13201ad41b8c7c8cf (diff) | |
download | public-inbox-f401be8bf5612178074d8d037776fee9e27bfd4c.tar.gz |
This avoids capturing links such as "http://#{foo}" => "http://#" inside diffs
-rw-r--r-- | lib/PublicInbox/View.pm | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/PublicInbox/View.pm b/lib/PublicInbox/View.pm index 08d78945..bd0a27aa 100644 --- a/lib/PublicInbox/View.pm +++ b/lib/PublicInbox/View.pm @@ -244,7 +244,9 @@ sub add_filename_line { "$pad " . ascii_html($fn) . " $pad\n"; } -my $LINK_RE = qr!\b((?:ftp|https?|nntp)://[@\w\+\&\?\.\%\;/#=-]+)!; +my $LINK_RE = qr!\b((?:ftp|https?|nntp):// + [\@:\w\.-]+/ + ?[\@\w\+\&\?\.\%\;/#=-]*)!x; sub linkify { # no newlines added here since it'd break the splitting we do |