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
This commit is contained in:
Lukáš Tinkl 2022-08-30 16:49:12 +02:00 committed by Lukáš Tinkl
parent b499942eea
commit 15d33eb7fd
1 changed files with 2 additions and 0 deletions

View File

@ -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 {