Use target blank on links so users dont navigate away from app

This commit is contained in:
Tor Hveem 2013-10-07 00:59:40 +02:00
parent e7adbffa47
commit befe6e9160
1 changed files with 1 additions and 1 deletions

View File

@ -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;
}