Merge pull request #737 from TimelessBeing/url_regexp

Improving urlRexexp for plugins
This commit is contained in:
Lorenz Hübschle-Schneider 2016-01-21 10:52:10 +01:00
commit 2594a0f268

View file

@ -23,7 +23,7 @@ var Plugin = function(name, contentForMessage) {
// Regular expression that detects URLs for UrlPlugin
var urlRegexp = /(?:ftp|https?):\/\/\S*[^\s.;,(){}<>]/g;
var urlRegexp = /(?:(?:https?|ftp):\/\/|www\.|ftp\.)\S*[^\s.;,(){}<>]/g;
/*
* Definition of a user provided plugin that consumes URLs
*