Improved chat URL regex to match more urls

This commit is contained in:
Ghazi Triki 2014-08-20 11:31:09 +01:00
parent 31b04303f9
commit bb57d17c84

View File

@ -54,7 +54,7 @@ package org.bigbluebutton.modules.chat
} }
public static function parseURLs( message : String ) : String{ 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 resultArray : Array = [];
var result : Object; var result : Object;