diff --git a/dom/base/nsCopySupport.cpp b/dom/base/nsCopySupport.cpp index 9fcc8e093306..1533c6b82d6d 100644 --- a/dom/base/nsCopySupport.cpp +++ b/dom/base/nsCopySupport.cpp @@ -171,8 +171,11 @@ SelectionCopyHelper(nsISelection *aSel, nsIDocument *aDoc, nsAutoString htmlInfoBuf; if (encodedTextHTML) { // Redo the encoding, but this time use the passed-in flags. + // Don't allow wrapping of CJK strings. mimeType.AssignLiteral(kHTMLMime); - rv = docEncoder->Init(domDoc, mimeType, aFlags); + rv = docEncoder->Init(domDoc, mimeType, + aFlags | + nsIDocumentEncoder::OutputDisallowLineBreaking); NS_ENSURE_SUCCESS(rv, rv); rv = docEncoder->SetSelection(aSel); diff --git a/dom/base/test/mochitest.ini b/dom/base/test/mochitest.ini index ae080d328d23..47f4b300c67d 100644 --- a/dom/base/test/mochitest.ini +++ b/dom/base/test/mochitest.ini @@ -333,6 +333,7 @@ skip-if = buildapp == 'b2g' || toolkit == 'android' # b2g(clipboard undefined) b skip-if = (buildapp == 'b2g' && toolkit != 'gonk') #Bug 931116, b2g desktop specific, initial triage [test_bug330925.xhtml] [test_bug331959.html] +[test_bug333064.html] [test_bug333198.html] [test_bug333673.html] [test_bug337631.html] diff --git a/dom/base/test/test_bug333064.html b/dom/base/test/test_bug333064.html new file mode 100644 index 000000000000..6e99fed88120 --- /dev/null +++ b/dom/base/test/test_bug333064.html @@ -0,0 +1,59 @@ + + + +
+++ + + + +