[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: kdelibs/khtml/xml
From: John Tapsell <john () geola ! co ! uk>
Date: 2004-12-23 3:18:19
Message-ID: 20041223031819.A3FA31CEB0 () office ! kde ! org
[Download RAW message or body]
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("<html><body>") + text + "</body></html>";
- else if(!hasHtmlTag) text = DOMString("<html>") + text + "</html>";
+ if(!hasBodyTag) text = DOMString("<body>") + text + "</body>";
+ else if(!hasHtmlTag) {
+ text = DOMString("<html xmlns=\"http://www.w3.org/1999/xhtml\">\n"
+ "<head>\n"
+ "<meta http-equiv=\"Content-Type\" content=\"text/html; \
charset=UTF-8\" />\n" + "<meta name=\"Generator\" \
content=\"KHTML, the KDE Web Page Viewer\" />\n" + "</head>\n") \
+ + text +
+ "</html>";
+ }
+ text = DOMString("<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Strict//EN\" \
\"DTD/xhtml1-strict.dtd\">\n") + text; +
+
+
return text;
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic