When "pasting" html in the document, platform-specific newline conventions need to be handled.
Attaching a patch. Charley, can you review this? It also includes a couple of warning fixes in nsHTMLEditor.cpp.
This fix looks fine with me. As to the warnings, those look good too, except I think: static int SetSelectionAroundHeadChildren... should be static nsresult SetSelectionAroundHeadChildren... just for good form.
verified in 5/8 build.