Merge pull request #368 from speakserve/better-chat-url-regex

Improved chat URL regex to match more urls
This commit is contained in:
Richard Alam 2014-08-20 09:37:41 -04:00
commit 8cf1c8cc94

View File

@ -54,7 +54,7 @@ package org.bigbluebutton.modules.chat
}
public static function parseURLs( message : String ) : String{
var urlPattern : RegExp = /(http|ftp|https|www)(:\/\/[\w\-_]+)?(\.[\w\-_]+)+([\w\-\.,@?^=%&:\/~\+#]*[\w\-\@?^=%&\/~\+#])?/g;
var urlPattern : RegExp = /(http|ftp|https|www)(:\/\/[^\s\-_]+)?(\.[^\s\-]+)+([\w\-\.,@?^=%&:\/~\+#]*[^\s\-\@?^=%&\/~\+#\(\)])?/g;
var resultArray : Array = [];
var result : Object;