From kde-commits Thu Dec 23 03:18:19 2004 From: John Tapsell Date: Thu, 23 Dec 2004 03:18:19 +0000 To: kde-commits Subject: kdelibs/khtml/xml Message-Id: <20041223031819.A3FA31CEB0 () office ! kde ! org> X-MARC-Message: https://marc.info/?l=kde-commits&m=110377191132393 CVS commit by johnflux: Add a header saying the encoding to the pasted text. Hopefully this will fix the problem a few people are having with the encoding of the text. M +14 -2 dom2_rangeimpl.cpp 1.37 --- kdelibs/khtml/xml/dom2_rangeimpl.cpp #1.36:1.37 @@ -1030,6 +1030,18 @@ DOMString RangeImpl::toHTML( int &except - if(!hasBodyTag) text = DOMString("") + text + ""; - else if(!hasHtmlTag) text = DOMString("") + text + ""; + if(!hasBodyTag) text = DOMString("") + text + ""; + else if(!hasHtmlTag) { + text = DOMString("\n" + "\n" + "\n" + "\n" + "\n") + + text + + ""; + } + text = DOMString("\n") + text; + + + return text;