diff options
author | jschuh@chromium.org <jschuh@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-01-04 15:10:52 +0000 |
---|---|---|
committer | jschuh@chromium.org <jschuh@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-01-04 15:10:52 +0000 |
commit | 84e8fa32e7ae4bac36922d3995d81e48da69ede7 (patch) | |
tree | 47da1f25776bf0c19b62306dfb619228b1c934a7 /chrome/common | |
parent | bd5fe75d8f96e9fefec473d70c276eca9d241769 (diff) | |
download | chromium_src-84e8fa32e7ae4bac36922d3995d81e48da69ede7.zip chromium_src-84e8fa32e7ae4bac36922d3995d81e48da69ede7.tar.gz chromium_src-84e8fa32e7ae4bac36922d3995d81e48da69ede7.tar.bz2 |
Merge 35377 - Replaces the % character with \x when generating Windows shortcuts via
File>"Create application shortcuts." The \x is converted back to % in
handling the app switch.
BUG=23693
TEST=None
Review URL: http://codereview.chromium.org/515028
TBR=jschuh@chromium.org
Review URL: http://codereview.chromium.org/524017
git-svn-id: svn://svn.chromium.org/chrome/branches/249/src@35453 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/common')
-rw-r--r-- | chrome/common/chrome_plugin_util.cc | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/chrome/common/chrome_plugin_util.cc b/chrome/common/chrome_plugin_util.cc index 4643a87..e547977 100644 --- a/chrome/common/chrome_plugin_util.cc +++ b/chrome/common/chrome_plugin_util.cc @@ -142,10 +142,13 @@ CPError CPB_GetCommandLineArgumentsCommon(const char* url, // chrome. // Note: Do not change this flag! Old Gears shortcuts will break if you do! std::string url_string(url); - ReplaceSubstringsAfterOffset(&url_string, 0, "\"", "\\\""); - ReplaceSubstringsAfterOffset(&url_string, 0, "%", "%%"); - ReplaceSubstringsAfterOffset(&url_string, 0, ";", ""); - ReplaceSubstringsAfterOffset(&url_string, 0, "$", ""); + ReplaceSubstringsAfterOffset(&url_string, 0, "\\", "%5C"); + ReplaceSubstringsAfterOffset(&url_string, 0, "\"", "%22"); + ReplaceSubstringsAfterOffset(&url_string, 0, ";", "%3B"); + ReplaceSubstringsAfterOffset(&url_string, 0, "$", "%24"); +#if defined(OS_WIN) // Windows shortcuts can't escape % so we use \x instead. + ReplaceSubstringsAfterOffset(&url_string, 0, "%", "\\x"); +#endif std::wstring url_w = UTF8ToWide(url_string); // TODO(evanm): use CommandLine APIs instead of this. arguments_w += std::wstring(L"--") + ASCIIToWide(switches::kApp) + |