From 7480ca15538cff4bb7e9a61a3dc4653aaa10c52d Mon Sep 17 00:00:00 2001 From: Igor Zhukov Date: Fri, 24 Jun 2016 18:59:15 +0300 Subject: [PATCH] Fixed sharing URL with ?& --- app/js/services.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/app/js/services.js b/app/js/services.js index cad85501..0b213108 100755 --- a/app/js/services.js +++ b/app/js/services.js @@ -4219,9 +4219,11 @@ angular.module('myApp.services', ['myApp.i18n', 'izhukov.utils']) function checkLocationTgAddr () { var tgaddr = $routeParams.tgaddr; if (tgaddr) { - try { - tgaddr = decodeURIComponent(tgaddr); - } catch (e) {}; + if (!tgaddr.match(/[=&?]/)) { + try { + tgaddr = decodeURIComponent(tgaddr); + } catch (e) {}; + } var matches = tgaddr.match(tgAddrRegExp); if (matches) { handleTgProtoAddr(matches[3]);