mirror of
https://github.com/vale981/tdesktop
synced 2025-03-06 02:01:40 -05:00
Fix regex for in app links (#3142)
Before, this regex matched also links which contained a in app link, e.g.: https://github.com/search?q=https://telegram.me/BotFather Fix #3141 Signed-off-by: Christoph <auer.chrisi@gmx.net>
This commit is contained in:
parent
47044ab25e
commit
be659e2611
1 changed files with 1 additions and 1 deletions
|
@ -40,7 +40,7 @@ QString tryConvertUrlToLocal(QString url) {
|
|||
|
||||
using namespace qthelp;
|
||||
auto matchOptions = RegExOption::CaseInsensitive;
|
||||
auto telegramMeMatch = regex_match(qsl("https?://(www\\.)?(telegram\\.(me|dog)|t\\.me)/(.+)$"), url, matchOptions);
|
||||
auto telegramMeMatch = regex_match(qsl("^https?://(www\\.)?(telegram\\.(me|dog)|t\\.me)/(.+)$"), url, matchOptions);
|
||||
if (telegramMeMatch) {
|
||||
auto query = telegramMeMatch->capturedRef(4);
|
||||
if (auto joinChatMatch = regex_match(qsl("^joinchat/([a-zA-Z0-9\\.\\_\\-]+)(\\?|$)"), query, matchOptions)) {
|
||||
|
|
Loading…
Add table
Reference in a new issue