Browse Source

Fixed urlencoded tgaddr

master
Igor Zhukov 10 years ago
parent
commit
9b41d0c8aa
  1. 8
      app/js/services.js

8
app/js/services.js

@ -5366,8 +5366,12 @@ angular.module('myApp.services', ['myApp.i18n', 'izhukov.utils'])
var tgAddrRegEx = /^(web\+)?tg:(\/\/)?(.+)/; var tgAddrRegEx = /^(web\+)?tg:(\/\/)?(.+)/;
function checkLocationTgAddr () { function checkLocationTgAddr () {
if ($routeParams.tgaddr) { var tgaddr = $routeParams.tgaddr;
var matches = $routeParams.tgaddr.match(tgAddrRegEx); if (tgaddr) {
try {
tgaddr = decodeURIComponent(tgaddr);
} catch (e) {};
var matches = tgaddr.match(tgAddrRegEx);
if (matches) { if (matches) {
handleTgProtoAddr(matches[3]); handleTgProtoAddr(matches[3]);
} }

Loading…
Cancel
Save