diff options
-rw-r--r-- | src/core/content_main_delegate_qt.cpp | 3 | ||||
-rw-r--r-- | src/core/web_engine_context.cpp | 2 |
2 files changed, 3 insertions, 2 deletions
diff --git a/src/core/content_main_delegate_qt.cpp b/src/core/content_main_delegate_qt.cpp index 2d7d1eb57..cf8582ef2 100644 --- a/src/core/content_main_delegate_qt.cpp +++ b/src/core/content_main_delegate_qt.cpp @@ -224,7 +224,8 @@ void ContentMainDelegateQt::PreSandboxStartup() #endif if (parsedCommandLine->HasSwitch(service_manager::switches::kApplicationName)) { - const std::string appName = parsedCommandLine->GetSwitchValueASCII(service_manager::switches::kApplicationName); + std::string appName = parsedCommandLine->GetSwitchValueASCII(service_manager::switches::kApplicationName); + appName = QByteArray::fromPercentEncoding(QByteArray::fromStdString(appName)).toStdString(); QCoreApplication::setApplicationName(QString::fromStdString(appName)); #if defined(OS_LINUX) media::AudioManager::SetGlobalAppName(appName); diff --git a/src/core/web_engine_context.cpp b/src/core/web_engine_context.cpp index c7add160b..6d76a818d 100644 --- a/src/core/web_engine_context.cpp +++ b/src/core/web_engine_context.cpp @@ -580,7 +580,7 @@ WebEngineContext::WebEngineContext() setupProxyPac(parsedCommandLine); parsedCommandLine->AppendSwitchPath(switches::kBrowserSubprocessPath, WebEngineLibraryInfo::getPath(content::CHILD_PROCESS_EXE)); - parsedCommandLine->AppendSwitchASCII(service_manager::switches::kApplicationName, QCoreApplication::applicationName().toStdString()); + parsedCommandLine->AppendSwitchASCII(service_manager::switches::kApplicationName, QCoreApplication::applicationName().toUtf8().toPercentEncoding().toStdString()); // Enable sandboxing on OS X and Linux (Desktop / Embedded) by default. bool disable_sandbox = qEnvironmentVariableIsSet(kDisableSandboxEnv); |