Summary: When editing text in an editable text element (contenteditable="true"), WebKit may generate HTML which is not valid (according to validator.w3.org) because block-level elements (DIVs) appear inside inline elements (FONT, B, SPAN). Steps to Reproduce: 1. Open the file 1.html in a WebView. 2. Open the file 2.rtf in TextEdit. 3. Copy the entire contents of 2.rtf. 4. Select the contents of the text element in the WebView. 5. Paste the (styled) text from the clipboard. 6. Dump the resulting HTML. Expected Results: Resulting HTML should not contain block-level elements inside inline elements. Actual Results: HTML output in 3.html. Regression: Notes:
Created attachment 97119 [details] Files mentioned in bug description.
We generate: <div contenteditable="true"><p class="p1"><b>xyz</b></p></div> now.