From a43ed511af1c740d4b9ab34286ce33edd856a0b8 Mon Sep 17 00:00:00 2001 From: "tc@google.com" Date: Tue, 3 Feb 2009 01:10:13 +0000 Subject: fix off by one in offset values for cf_html. This was causing the final tag to not be closed which resulted in it showing up when pasting into a pidgin chat window (among other places). BUG=7102 Review URL: http://codereview.chromium.org/19763 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@9057 0039d316-1c4b-4281-b951-d872f2087c98 --- base/clipboard_util.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'base') diff --git a/base/clipboard_util.cc b/base/clipboard_util.cc index a9e7d2a..e56166d 100644 --- a/base/clipboard_util.cc +++ b/base/clipboard_util.cc @@ -429,7 +429,7 @@ std::string ClipboardUtil::HtmlToCFHtml(const std::string& html, MAX_DIGITS * 4; if (!base_url.empty()) { start_html_offset += strlen(source_url_prefix) + - base_url.length() + 1; + base_url.length() + 2; // Add 2 for \r\n. } size_t start_fragment_offset = start_html_offset + strlen(start_markup); size_t end_fragment_offset = start_fragment_offset + html.length(); -- cgit v1.1