Fixed URL regexp

Closes #690
This commit is contained in:
Igor Zhukov 2015-02-13 12:46:54 +03:00
parent 0eb1a9a0b4
commit dcf985b3af

View File

@ -3552,7 +3552,7 @@ angular.module('myApp.services', ['myApp.i18n', 'izhukov.utils'])
// port number
"(?::\\d{2,5})?" +
// resource path
"(?:/[^\\s\\.\"\']*)?";
"(?:/(?:\\S*[^\s.;,(){}<>\"'])?)?";
var regExp = new RegExp('(^|\\s)((?:https?://)?telegram\\.me/|@)([a-zA-Z\\d_]{5,32})|(' + urlRegex + ')|(\\n)|(' + emojiUtf.join('|') + ')|(^|\\s)(#[' + regexAlphaNumericChars + ']{2,20})', 'i');