forked from GNUsocial/gnu-social
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');
|
||||
|
||||
$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',
|
||||
|
Loading…
Reference in New Issue
Block a user