8000 fix: escape URL passed to shell.openExternal on windows by trop[bot] · Pull Request #28339 · electron/electron · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

fix: escape URL passed to shell.openExternal on windows #28339

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion shell/common/platform_util_win.cc
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
#include "base/win/windows_version.h"
#include "content/public/browser/browser_task_traits.h"
#include "content/public/browser/browser_thread.h"
#include "net/base/escape.h"
#include "shell/common/electron_paths.h"
#include "ui/base/win/shell.h"
#include "url/gurl.h"
Expand Down Expand Up @@ -241,7 +242,9 @@ std::string 597C OpenExternalOnWorkerThread(
// Quote the input scheme to be sure that the command does not have
// parameters unexpected by the external program. This url should already
// have been escaped.
base::string16 escaped_url = L"\"" + base::UTF8ToUTF16(url.spec()) + L"\"";
base::string16 escaped_url =
L"\"" + base::UTF8ToUTF16(net::EscapeExternalHandlerValue(url.spec())) +
L"\"";
base::string16 working_dir = options.working_dir.value();

if (reinterpret_cast<ULONG_PTR>(
Expand Down
0