Skip to content

Commit

Permalink
Fixed unwanted tg proto URLs handling
Browse files Browse the repository at this point in the history
  • Loading branch information
zhukov committed Feb 13, 2018
1 parent 55c661a commit 32f67b1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion app/js/lib/ng_utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -1925,7 +1925,7 @@ angular.module('izhukov.utils', [])
}

function wrapUrl (url, unsafe) {
if (!url.match(/^(https?|tg):\/\//i)) {
if (!url.match(/^https?:\/\//i)) {
url = 'http://' + url
}
var tgMeMatch
Expand Down
3 changes: 3 additions & 0 deletions app/js/services.js
Original file line number Diff line number Diff line change
Expand Up @@ -4797,6 +4797,9 @@ angular.module('myApp.services', ['myApp.i18n', 'izhukov.utils'])
url.search('https://t.me/') === 0) {
target = '_self'
}
else if (!url.match(/^https?:\/\//)) {
url = 'http://' + url
}
var popup = window.open(url, target)
try {
popup.opener = null;
Expand Down

0 comments on commit 32f67b1

Please sign in to comment.