Corrected initial implementation of Twitter autolinks

This commit is contained in:
Rob Sutherland 2012-05-11 12:57:19 -05:00
parent 6426b63a4a
commit b03048799b

View File

@ -1130,7 +1130,8 @@ var _DoAutoLinks = function(text) {
text = text.replace(/<((https?|ftp|dict):[^'">\s]+)>/gi,"<a href=\"$1\">$1</a>");
// Twitter: @twitter_username
text = text.replace(/\s@([-\w])/gi,"<a href=\"http://twitter.com/$1>$1</a>");
text = text.replace(/(?:@(\w{1,15}))/gi,"<a href=\"http://twitter.com/$1\">@$1</a>");
// Email addresses: <address@domain.foo>