summaryrefslogtreecommitdiffstats
path: root/base/clipboard_util.cc
diff options
context:
space:
mode:
authortc@google.com <tc@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-02-03 01:10:13 +0000
committertc@google.com <tc@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-02-03 01:10:13 +0000
commita43ed511af1c740d4b9ab34286ce33edd856a0b8 (patch)
tree360368d5ef00cc815b60e12a9e35123113e6df33 /base/clipboard_util.cc
parentdaa1732e6c87bcaf854ca3a30c7c5b47599a8d7a (diff)
downloadchromium_src-a43ed511af1c740d4b9ab34286ce33edd856a0b8.zip
chromium_src-a43ed511af1c740d4b9ab34286ce33edd856a0b8.tar.gz
chromium_src-a43ed511af1c740d4b9ab34286ce33edd856a0b8.tar.bz2
fix off by one in offset values for cf_html.
This was causing the final </span> 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
Diffstat (limited to 'base/clipboard_util.cc')
-rw-r--r--base/clipboard_util.cc2
1 files changed, 1 insertions, 1 deletions
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();