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

Unified Diff: chrome/browser/net/browser_url_util.cc

Issue 342031: Mailto links should not include mailto: when copying to the clipboard.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 11 years, 2 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/net/browser_url_util.cc
===================================================================
--- chrome/browser/net/browser_url_util.cc (revision 30386)
+++ chrome/browser/net/browser_url_util.cc (working copy)
@@ -6,6 +6,7 @@
#include "app/clipboard/scoped_clipboard_writer.h"
#include "base/string_util.h"
+#include "chrome/common/url_constants.h"
#include "googleurl/src/gurl.h"
#include "net/base/net_util.h"
@@ -19,7 +20,9 @@
// Unescaping path and query is not a good idea because other applications
// may not encode non-ASCII characters in UTF-8. See crbug.com/2820.
- string16 text = WideToUTF16(net::FormatUrl(url, languages, false,
+ string16 text = url.SchemeIs(chrome::kMailToScheme) ?
+ ASCIIToUTF16(url.path()) :
+ WideToUTF16(net::FormatUrl(url, languages, false,
UnescapeRule::NONE, NULL, NULL));
ScopedClipboardWriter scw(clipboard);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698