diff --git a/data/webkit/e-editor.js b/data/webkit/e-editor.js index ad39ad1161..45bb2aa144 100644 --- a/data/webkit/e-editor.js +++ b/data/webkit/e-editor.js @@ -5087,7 +5087,7 @@ EvoEditor.InsertContent = function(text, isHTML, quote) } var wasPlain = !isHTML; - var content = document.createElement(quote ? "BLOCKQUOTE" : "DIV"); + var content = document.createElement(quote ? "BLOCKQUOTE" : wasPlain ? "PRE" : "DIV"); if (quote) { content.setAttribute("type", "cite"); @@ -5145,7 +5145,7 @@ EvoEditor.InsertContent = function(text, isHTML, quote) for (ii = 0; ii < lines.length; ii++) { line = lines[ii]; - divNode = document.createElement("DIV"); + divNode = document.createElement(wasPlain ? "PRE" : "DIV"); content.appendChild(divNode); diff --git a/src/e-util/test-html-editor-units-bugs.c b/src/e-util/test-html-editor-units-bugs.c index 83844a063e..f6c5b68579 100644 --- a/src/e-util/test-html-editor-units-bugs.c +++ b/src/e-util/test-html-editor-units-bugs.c @@ -761,12 +761,12 @@ test_bug_773164 (TestFixture *fixture) "undo:undo:3\n" "undo:test\n" "undo:redo:3\n", - HTML_PREFIX "
This is paragraph 1" + "
" + "
This is a longer paragraph 3" + "
" + "
This is paragraph 2" + "
" HTML_SUFFIX, "This is paragraph 1\n" "\n" @@ -982,8 +982,8 @@ test_bug_780275_html (TestFixture *fixture) "undo:redo\n", HTML_PREFIX "
" - "" "Xline 1" - "line 2" + "Xline 1" + "line 2" "
" - "" "" QUOTE_SPAN (QUOTE_CHR) "Xline 1" - "" QUOTE_SPAN (QUOTE_CHR) "line 2" + "" QUOTE_SPAN (QUOTE_CHR) "Xline 1" + "" QUOTE_SPAN (QUOTE_CHR) "line 2" "
line 2
line 3
text after" HTML_SUFFIX, "text before line 1\nline 2\nline 3\ntext after\n")) g_test_fail (); } @@ -4369,9 +4369,9 @@ test_paste_multiline_plain2plain (TestFixture *fixture) "action:paste\n" "type:\\ntext after\n", HTML_PREFIX "
line 2" + "
line 3" + "
text after" HTML_SUFFIX, "text before line 1\nline 2\nline 3\ntext after\n")) g_test_fail (); } @@ -4518,10 +4518,10 @@ test_paste_quoted_multiline_plain2html (TestFixture *fixture) "type:\\n\n" /* stop quotting */ "type:text after\n", HTML_PREFIX "
" + "line 1" - "line 2" - "line 3" - "
" "line 1" + "line 2" + "line 3" + "
" + "" QUOTE_SPAN (QUOTE_CHR) "line 1" - "" QUOTE_SPAN (QUOTE_CHR) "line 2" - "" QUOTE_SPAN (QUOTE_CHR) "line 3
" "" QUOTE_SPAN (QUOTE_CHR) "line 1" + "" QUOTE_SPAN (QUOTE_CHR) "line 2" + "" QUOTE_SPAN (QUOTE_CHR) "line 3
" - "" HTML_SUFFIX, "line 0\n" @@ -6868,8 +6868,8 @@ test_delete_quoted_multiselect (TestFixture *fixture) "undo:save\n" /* 1 */ "seq:ChcrrSdsD\n", HTML_PREFIX "" QUOTE_SPAN (QUOTE_CHR) "line 1" - "" QUOTE_SPAN (QUOTE_CHR) "" - "" QUOTE_SPAN (QUOTE_CHR) "line 2" - "" QUOTE_SPAN (QUOTE_CHR) "X" + "" QUOTE_SPAN (QUOTE_CHR) "line 1" + "" QUOTE_SPAN (QUOTE_CHR) "" + "" QUOTE_SPAN (QUOTE_CHR) "line 2" + "" QUOTE_SPAN (QUOTE_CHR) "X" "
" - "" HTML_SUFFIX, "> line 2\n" @@ -6886,8 +6886,8 @@ test_delete_quoted_multiselect (TestFixture *fixture) "seq:Cec\n" /* Go to the end of the document (Ctrl+End) */ "type:\\nY\n", HTML_PREFIX "line 2" - "line 3X" + "line 2" + "line 3X" "
" - "" "line 2" - "line 3X" + "line 2" + "line 3X" "
" - "" HTML_SUFFIX, "> line 2\n" @@ -6924,8 +6924,8 @@ test_delete_quoted_multiselect (TestFixture *fixture) "seq:Cec\n" /* Go to the end of the document (Ctrl+End) */ "type:\\nY\n", HTML_PREFIX "" QUOTE_SPAN (QUOTE_CHR) "line 2" - "" QUOTE_SPAN (QUOTE_CHR) "line 3X" + "" QUOTE_SPAN (QUOTE_CHR) "line 2" + "" QUOTE_SPAN (QUOTE_CHR) "line 3X" "
" - "" "" QUOTE_SPAN (QUOTE_CHR) "line 2" - "" QUOTE_SPAN (QUOTE_CHR) "line 3X" + "" QUOTE_SPAN (QUOTE_CHR) "line 2" + "" QUOTE_SPAN (QUOTE_CHR) "line 3X" "