From 792eade6c29beb6cf9b1e31ddffdc6476ff21b01 Mon Sep 17 00:00:00 2001 From: David Phillips Date: Wed, 20 Jun 2018 17:41:52 +1200 Subject: Change URL parsing from space to RFC 3982 --- Plugin/URL_Title.pm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'Plugin') diff --git a/Plugin/URL_Title.pm b/Plugin/URL_Title.pm index 6d46e43..a2c8930 100644 --- a/Plugin/URL_Title.pm +++ b/Plugin/URL_Title.pm @@ -36,7 +36,8 @@ sub message return if ($config{url_on} == 0); - if ($what =~ /(https?:\/\/[^ ]+)/i) { + # Drawn from RFC 3986ยง2 + if ($what =~ /(https?:\/\/[A-z0-9\-\._~:\/\?#\[\]@\!\$&'()\*\+,;=]+)/i) { $url = $1; } return unless $url; -- cgit v1.1