percent encode all urls opening in external browsers

This commit is contained in:
Martin Rotter 2023-12-05 10:23:41 +01:00
parent 4286b7246e
commit 61ca7011f0
2 changed files with 3 additions and 3 deletions

View file

@ -119,8 +119,8 @@ void WebFactory::loadCustomCss(const QString user_styles_path) {
} }
#endif #endif
bool WebFactory::openUrlInExternalBrowser(const QString& url) const { bool WebFactory::openUrlInExternalBrowser(const QUrl& url) const {
QString my_url = QUrl::toPercentEncoding(url); QString my_url = url.toString(QUrl::ComponentFormattingOption::FullyEncoded);
qDebugNN << LOGSEC_NETWORK << "We are trying to open URL" << QUOTE_W_SPACE_DOT(my_url); qDebugNN << LOGSEC_NETWORK << "We are trying to open URL" << QUOTE_W_SPACE_DOT(my_url);

View file

@ -67,7 +67,7 @@ class WebFactory : public QObject {
void cleanupCache(); void cleanupCache();
#endif #endif
bool openUrlInExternalBrowser(const QString& url) const; bool openUrlInExternalBrowser(const QUrl& url) const;
#if defined(NO_LITE) #if defined(NO_LITE)
private slots: private slots: