fix url replace to include brackets
This commit is contained in:
parent
cf5b53586f
commit
cc46e88522
1 changed files with 1 additions and 1 deletions
|
@ -306,7 +306,7 @@ Twittia.prototype.authorizationHeader = function(method, url, params) {
|
|||
}
|
||||
|
||||
function replaceURLWithHTMLLinks(text) {
|
||||
var exp = /(\b(https?|ftp|file):\/\/[-A-Z0-9+&@#\/%?=~_|!:,.;]*[-A-Z0-9+&@#\/%=~_|])/ig;
|
||||
var exp = /(\b(https?|ftp|file):\/\/[-A-Z0-9+&@#\/%?=~_()|!:,.;]*[-A-Z0-9+&@#\/%=~_|])/ig;
|
||||
return text.replace(exp,"<a href='$1'>$1</a>");
|
||||
}
|
||||
|
||||
|
|
Reference in a new issue