summaryrefslogtreecommitdiffstats
path: root/app/clipboard
diff options
context:
space:
mode:
Diffstat (limited to 'app/clipboard')
-rw-r--r--app/clipboard/clipboard_mac.mm4
-rw-r--r--app/clipboard/clipboard_unittest.cc3
2 files changed, 4 insertions, 3 deletions
diff --git a/app/clipboard/clipboard_mac.mm b/app/clipboard/clipboard_mac.mm
index 1596eba..f546f84 100644
--- a/app/clipboard/clipboard_mac.mm
+++ b/app/clipboard/clipboard_mac.mm
@@ -64,7 +64,9 @@ void Clipboard::WriteHTML(const char* markup_data,
size_t markup_len,
const char* url_data,
size_t url_len) {
- std::string html_fragment_str(markup_data, markup_len);
+ // We need to mark it as utf-8. (see crbug.com/11957)
+ std::string html_fragment_str("<meta charset='utf-8'>");
+ html_fragment_str.append(markup_data, markup_len);
NSString *html_fragment = base::SysUTF8ToNSString(html_fragment_str);
// TODO(avi): url_data?
diff --git a/app/clipboard/clipboard_unittest.cc b/app/clipboard/clipboard_unittest.cc
index 8203bac..8a2bd62 100644
--- a/app/clipboard/clipboard_unittest.cc
+++ b/app/clipboard/clipboard_unittest.cc
@@ -34,7 +34,7 @@ namespace {
bool ClipboardContentsIsExpected(const string16& copied_markup,
const string16& pasted_markup) {
-#if defined(OS_LINUX)
+#if defined(OS_POSIX)
return pasted_markup.find(copied_markup) != string16::npos;
#else
return copied_markup == pasted_markup;
@@ -353,4 +353,3 @@ TEST_F(ClipboardTest, WriteEverything) {
// Passes if we don't crash.
}
-