We are no longer offering accounts on this server. Consider https://gitlab.freedesktop.org/ as a place to host projects.

Commit 1e7df7fb authored by Sarven Capadisli's avatar Sarven Capadisli

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.
parent 353f58c2
......@@ -109,8 +109,8 @@ class HTMLOutputter extends XMLOutputter
header('Content-Type: '.$type.'; charset=UTF-8');
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');
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment