Use target blank on links so users dont navigate away from app
This commit is contained in:
parent
e7adbffa47
commit
befe6e9160
1 changed files with 1 additions and 1 deletions
|
@ -235,7 +235,7 @@ weechat.factory('urlPlugin', [function() {
|
|||
var urlPattern = /(http|ftp|https):\/\/[\w-]+(\.[\w-]+)+([\w.,@?^=%&:\/~+#-]*[\w@?^=%&\/~+#-])?/;
|
||||
var url = message.match(urlPattern);
|
||||
if (url) {
|
||||
return '<a href="' + url[0] + '">' + message + '</a>';
|
||||
return '<a target="_blank" href="' + url[0] + '">' + message + '</a>';
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue