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

Unified Diff: base/clipboard_util.cc

Issue 11465: fix unittests (Closed)
Patch Set: Created 12 years, 1 month 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 | « base/clipboard_unittest.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/clipboard_util.cc
diff --git a/base/clipboard_util.cc b/base/clipboard_util.cc
index 5b64732adac86d632c972a4fb032f608cdc62f8f..a9e7d2afbf4b40fb651b05df1783eb12e50531a4 100644
--- a/base/clipboard_util.cc
+++ b/base/clipboard_util.cc
@@ -466,6 +466,7 @@ void ClipboardUtil::CFHtmlToHtml(const std::string& cf_html,
size_t src_start = line_start + src_url_str.length();
if (src_end != std::string::npos && src_start != std::string::npos) {
*base_url = cf_html.substr(src_start, src_end - src_start);
+ TrimWhitespace(*base_url, TRIM_ALL, base_url);
}
}
@@ -474,7 +475,7 @@ void ClipboardUtil::CFHtmlToHtml(const std::string& cf_html,
size_t markup_start = cf_html_lower.find("<html", 0);
Evan Stade 2008/11/19 02:39:33 The function we had previously (which looks like i
size_t tag_start = cf_html.find("StartFragment", markup_start);
size_t fragment_start = cf_html.find('>', tag_start) + 1;
- size_t tag_end = cf_html.find("EndFragment", fragment_start);
+ size_t tag_end = cf_html.rfind("EndFragment", std::string::npos);
size_t fragment_end = cf_html.rfind('<', tag_end);
if (fragment_start != std::string::npos &&
fragment_end != std::string::npos) {
« no previous file with comments | « base/clipboard_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698