summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/htmloutputter.php9
1 files changed, 7 insertions, 2 deletions
diff --git a/lib/htmloutputter.php b/lib/htmloutputter.php
index cba8a5f5e..8f3b1a609 100644
--- a/lib/htmloutputter.php
+++ b/lib/htmloutputter.php
@@ -109,8 +109,13 @@ class HTMLOutputter extends XMLOutputter
header('Content-Type: '.$type);
$this->extraHeaders();
-
- $this->startXML('html');
+ if( ! substr($type,0,strlen('text/html'))=='text/html' ){
+ // Browsers don't like it when <?xml it output for non-xhtml documents
+ $this->xw->startDocument('1.0', 'UTF-8');
+ }
+ if ($doc) {
+ $this->xw->writeDTD('html', $public, $system);
+ }
$language = $this->getLanguage();