summaryrefslogtreecommitdiff
path: root/lib/htmloutputter.php
diff options
context:
space:
mode:
authorSarven Capadisli <csarven@status.net>2009-09-30 10:53:04 +0000
committerSarven Capadisli <csarven@status.net>2009-09-30 10:53:04 +0000
commit1e7df7fbab8a03468a1697240e92f67c82dadced (patch)
tree98c3e0e7ba5ee1dc17f0d959b32d999aa17f59e8 /lib/htmloutputter.php
parent353f58c23149159306131b0819de713da6b69464 (diff)
Better check to see if the XML prolog should be outputted for XML
documents i.e., if best mimetype is */*xml, then use the XML prolog.
Diffstat (limited to 'lib/htmloutputter.php')
-rw-r--r--lib/htmloutputter.php4
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',