Updated Autolinker lib

Fixed short links detection (Closes #354)
This commit is contained in:
RainLoop Team 2014-10-15 13:20:55 +04:00
parent 0af6fbadaa
commit 6acba46339
10 changed files with 2424 additions and 258 deletions

View file

@ -147,7 +147,7 @@
*/
Links.prototype.inbox = function ()
{
return this.sBase + 'mailbox/Inbox';
return this.sBase + 'mailbox/INBOX';
};
/**

View file

@ -1593,7 +1593,10 @@
'stripPrefix': false,
'urls': true,
'email': true,
'twitter': false
'twitter': false,
'replaceFn': function (autolinker, match) {
return !(autolinker && match && 'url' === match.getType() && match.matchedText && 0 !== match.matchedText.indexOf('http'));
}
});
return sHtml;

View file

@ -153,7 +153,7 @@
{
var
fNormP = function () {
return ['Inbox', 1, '', true];
return ['INBOX', 1, '', true];
},
fNormS = function (oRequest, oVals) {
oVals[0] = Utils.pString(oVals[0]);
@ -163,7 +163,7 @@
if ('' === oRequest)
{
oVals[0] = 'Inbox';
oVals[0] = 'INBOX';
oVals[1] = 1;
}
@ -175,7 +175,7 @@
if ('' === oRequest)
{
oVals[0] = 'Inbox';
oVals[0] = 'INBOX';
}
return [decodeURI(oVals[0]), 1, decodeURI(oVals[1]), false];