Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(8861)

Unified Diff: chrome/common/chrome_plugin_util.cc

Issue 255016: GTK: improve app mode .desktop file creation.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/shell_integration_unittest.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/common/chrome_plugin_util.cc
===================================================================
--- chrome/common/chrome_plugin_util.cc (revision 27632)
+++ chrome/common/chrome_plugin_util.cc (working copy)
@@ -140,8 +140,13 @@
// Use '--app=url' instead of just 'url' to launch the browser with minimal
// chrome.
// Note: Do not change this flag! Old Gears shortcuts will break if you do!
- std::wstring url_w = UTF8ToWide(url);
- arguments_w += std::wstring(L"--") + switches::kApp + L'=' + url_w;
+ std::string url_string(url);
+ ReplaceSubstringsAfterOffset(&url_string, 0, "\"", "\\\"");
+ ReplaceSubstringsAfterOffset(&url_string, 0, "%", "%%");
+ ReplaceSubstringsAfterOffset(&url_string, 0, ";", "");
+ ReplaceSubstringsAfterOffset(&url_string, 0, "$", "");
+ std::wstring url_w = UTF8ToWide(url_string);
+ arguments_w += std::wstring(L"--") + switches::kApp + L"=\"" + url_w + L"\"";
*arguments = WideToUTF8(arguments_w);
« no previous file with comments | « chrome/browser/shell_integration_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698