From 9b41d0c8aab462df040f62aa69bad108371db8f6 Mon Sep 17 00:00:00 2001 From: Igor Zhukov Date: Tue, 5 May 2015 23:42:07 +0300 Subject: [PATCH] Fixed urlencoded tgaddr --- app/js/services.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/app/js/services.js b/app/js/services.js index 9c469957..9f10c5f9 100755 --- a/app/js/services.js +++ b/app/js/services.js @@ -5366,8 +5366,12 @@ angular.module('myApp.services', ['myApp.i18n', 'izhukov.utils']) var tgAddrRegEx = /^(web\+)?tg:(\/\/)?(.+)/; function checkLocationTgAddr () { - if ($routeParams.tgaddr) { - var matches = $routeParams.tgaddr.match(tgAddrRegEx); + var tgaddr = $routeParams.tgaddr; + if (tgaddr) { + try { + tgaddr = decodeURIComponent(tgaddr); + } catch (e) {}; + var matches = tgaddr.match(tgAddrRegEx); if (matches) { handleTgProtoAddr(matches[3]); }