From 15d33eb7fd657b5193a15b375ef9db97db08635f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luk=C3=A1=C5=A1=20Tinkl?= Date: Tue, 30 Aug 2022 16:49:12 +0200 Subject: [PATCH] fix(Global): 'Open in Browser' doesn't work in chat strip the URL from any HTML tags before trying to open it; Qt sometimes likes to leave some HTML tags there and that breaks the URL validity checks further on Fixes: #7170 --- ui/imports/utils/Global.qml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ui/imports/utils/Global.qml b/ui/imports/utils/Global.qml index 3e1e900b66..518ab04fb3 100644 --- a/ui/imports/utils/Global.qml +++ b/ui/imports/utils/Global.qml @@ -85,6 +85,8 @@ QtObject { } function openLink(link) { + // Qt sometimes inserts random HTML tags; and this will break on invalid URL inside QDesktopServices::openUrl(link) + link = globalUtils.plainText(link); if (localAccountSensitiveSettings.showBrowserSelector) { openChooseBrowserPopup(link); } else {