escape URL when opening with custom ext. browser

This commit is contained in:
Martin Rotter 2021-02-23 06:50:12 +01:00
parent 8fafa5e6e6
commit 34d1b02299

View File

@ -71,7 +71,8 @@ bool WebFactory::openUrlInExternalBrowser(const QString& url) const {
if (qApp->settings()->value(GROUP(Browser), SETTING(Browser::CustomExternalBrowserEnabled)).toBool()) {
const QString browser = qApp->settings()->value(GROUP(Browser), SETTING(Browser::CustomExternalBrowserExecutable)).toString();
const QString arguments = qApp->settings()->value(GROUP(Browser), SETTING(Browser::CustomExternalBrowserArguments)).toString();
auto nice_args = arguments.arg(url);
const QString escaped_url = QUrl::toPercentEncoding(url);
auto nice_args = arguments.arg(escaped_url);
qDebugNN << LOGSEC_NETWORK << "Arguments for external browser:" << QUOTE_W_SPACE_DOT(nice_args);