diff options
-rw-r--r-- | lib/htmloutputter.php | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/htmloutputter.php b/lib/htmloutputter.php index 99f956545..64be745be 100644 --- a/lib/htmloutputter.php +++ b/lib/htmloutputter.php @@ -109,8 +109,8 @@ class HTMLOutputter extends XMLOutputter header('Content-Type: '.$type.'; charset=UTF-8'); $this->extraHeaders(); - if( ! substr($type,0,strlen('text/html'))=='text/html' ){ - // Browsers don't like it when <?xml it output for non-xhtml documents + if (preg_match("/.*\/.*xml/", $type)) { + // Required for XML documents $this->xw->startDocument('1.0', 'UTF-8'); } $this->xw->writeDTD('html', |