aboutsummaryrefslogtreecommitdiff
path: root/Plugin/URL_Title.pm
diff options
context:
space:
mode:
authorDavid Phillips <david@sighup.nz>2018-06-20 17:41:52 +1200
committerDavid Phillips <david@sighup.nz>2018-06-20 17:42:56 +1200
commit792eade6c29beb6cf9b1e31ddffdc6476ff21b01 (patch)
tree94e5740755bd04c309b09f1e9f8ccd1d10f0804f /Plugin/URL_Title.pm
parent53718f690df53285362145ee474f40a2f5cc63e7 (diff)
downloadidalius-792eade6c29beb6cf9b1e31ddffdc6476ff21b01.tar.xz
Change URL parsing from space to RFC 3982
Diffstat (limited to 'Plugin/URL_Title.pm')
-rw-r--r--Plugin/URL_Title.pm3
1 files changed, 2 insertions, 1 deletions
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;