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.
This commit is contained in:
parent
353f58c231
commit
1e7df7fbab
|
@ -109,8 +109,8 @@ class HTMLOutputter extends XMLOutputter
|
||||||
header('Content-Type: '.$type.'; charset=UTF-8');
|
header('Content-Type: '.$type.'; charset=UTF-8');
|
||||||
|
|
||||||
$this->extraHeaders();
|
$this->extraHeaders();
|
||||||
if( ! substr($type,0,strlen('text/html'))=='text/html' ){
|
if (preg_match("/.*\/.*xml/", $type)) {
|
||||||
// Browsers don't like it when <?xml it output for non-xhtml documents
|
// Required for XML documents
|
||||||
$this->xw->startDocument('1.0', 'UTF-8');
|
$this->xw->startDocument('1.0', 'UTF-8');
|
||||||
}
|
}
|
||||||
$this->xw->writeDTD('html',
|
$this->xw->writeDTD('html',
|
||||||
|
|
Loading…
Reference in New Issue
Block a user