From 3c5267f30775f5891762ea220ae50b5a92833ec7 Mon Sep 17 00:00:00 2001 From: John Preston Date: Sat, 21 May 2022 15:59:14 +0400 Subject: [PATCH] Fix invoice links slug reg-exp. --- Telegram/SourceFiles/core/local_url_handlers.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Telegram/SourceFiles/core/local_url_handlers.cpp b/Telegram/SourceFiles/core/local_url_handlers.cpp index 5b4a8cce15..ce4845121b 100644 --- a/Telegram/SourceFiles/core/local_url_handlers.cpp +++ b/Telegram/SourceFiles/core/local_url_handlers.cpp @@ -871,7 +871,7 @@ QString TryConvertUrlToLocal(QString url) { return qsl("tg://socks?") + socksMatch->captured(1); } else if (auto proxyMatch = regex_match(qsl("^proxy/?\\?(.+)(#|$)"), query, matchOptions)) { return qsl("tg://proxy?") + proxyMatch->captured(1); - } else if (auto invoiceMatch = regex_match(qsl("^(invoice/|\\$)([a-zA-Z0-9]+)(\\?|#|$)"), query, matchOptions)) { + } else if (auto invoiceMatch = regex_match(qsl("^(invoice/|\\$)([a-zA-Z0-9_\\-]+)(\\?|#|$)"), query, matchOptions)) { return qsl("tg://invoice?slug=") + invoiceMatch->captured(2); } else if (auto bgMatch = regex_match(qsl("^bg/([a-zA-Z0-9\\.\\_\\-\\~]+)(\\?(.+)?)?$"), query, matchOptions)) { const auto params = bgMatch->captured(3);