|
|
@@ -25,7 +25,7 @@ function BxTimelinePost(oOptions) {
|
|
|
|
|
|
this._sPregTag = "(<([^>]+bx-tag[^>]+)>)";
|
|
|
this._sPregMention = "(<([^>]+bx-mention[^>]+)>)";
|
|
|
- this._sPregUrl = "(([A-Za-z]{3,9}:(?:\\/\\/)?)(?:[\\-;:&=\\+\\$,\\w]+@)?[A-Za-z0-9\\.\\-]+|(?:www\\.|[\\-;:&=\\+\\$,\\w]+@)[A-Za-z0-9\\.\\-]+)((?:\\/[\\+~%\\/\\.\\w\\-_!\\(\\)]*)?\\??(?:[\\-\\+=&;%@\\.\\w_]*)#?(?:[\\.\\!\\/\\w]*))?";
|
|
|
+ this._sPregUrl = "(([A-Za-z]{3,9}:(?:\\/\\/)?)(?:[\\-;:&=\\+\\$,\\w]+@)?[A-Za-z0-9\\.\\-]+|(?:www\\.|[\\-;:&=\\+\\$,\\w]+@)[A-Za-z0-9\\.\\-]+)((?:\\/[\\+~%#\\/\\.\\w\\-_!\\(\\)]*)?\\??(?:[\\-\\+=&;%@\\.\\w_]*)#?(?:[\\.\\!\\/\\w]*))?";
|
|
|
|
|
|
var $this = this;
|
|
|
if (typeof window.glOnInitEditor === 'undefined')
|
|
|
@@ -111,7 +111,7 @@ BxTimelinePost.prototype.initFormPost = function(sFormId)
|
|
|
|
|
|
oExp = new RegExp($this._sPregUrl , "ig");
|
|
|
while(aMatch = oExp.exec(sData)) {
|
|
|
- var sUrl = aMatch[0];
|
|
|
+ var sUrl = aMatch[0].replace(/^[\s( )]+|[\s( )]+$/gm,'');
|
|
|
if(!sUrl.length || $this._oAttachedLinks[sUrl] != undefined || ($this._iLimitAttachLinks != 0 && Object.keys($this._oAttachedLinks).length >= $this._iLimitAttachLinks))
|
|
|
continue;
|
|
|
|