|
|
@ -1624,7 +1624,7 @@ angular.module('izhukov.utils', []) |
|
|
|
break; |
|
|
|
break; |
|
|
|
} |
|
|
|
} |
|
|
|
var url = entity.url || entityText; |
|
|
|
var url = entity.url || entityText; |
|
|
|
url = wrapUrl(url, entity._ == 'messageEntityTextUrl'); |
|
|
|
url = wrapUrl(url, entity._ == 'messageEntityTextUrl' ? 2 : false); |
|
|
|
html.push( |
|
|
|
html.push( |
|
|
|
'<a href="', |
|
|
|
'<a href="', |
|
|
|
encodeEntities(url), |
|
|
|
encodeEntities(url), |
|
|
@ -1785,7 +1785,7 @@ angular.module('izhukov.utils', []) |
|
|
|
url = 'http://' + url; |
|
|
|
url = 'http://' + url; |
|
|
|
} |
|
|
|
} |
|
|
|
var tgMeMatch; |
|
|
|
var tgMeMatch; |
|
|
|
if (unsafe) { |
|
|
|
if (unsafe == 2) { |
|
|
|
url = 'tg://unsafe_url?url=' + encodeURIComponent(url); |
|
|
|
url = 'tg://unsafe_url?url=' + encodeURIComponent(url); |
|
|
|
} |
|
|
|
} |
|
|
|
else if ((tgMeMatch = url.match(/^https?:\/\/telegram\.me\/(.+)/))) { |
|
|
|
else if ((tgMeMatch = url.match(/^https?:\/\/telegram\.me\/(.+)/))) { |
|
|
@ -1807,6 +1807,9 @@ angular.module('izhukov.utils', []) |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
else if (unsafe) { |
|
|
|
|
|
|
|
url = 'tg://unsafe_url?url=' + encodeURIComponent(url); |
|
|
|
|
|
|
|
} |
|
|
|
return url; |
|
|
|
return url; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|