diff --git a/core/control/ContentNegotiator.php b/core/control/ContentNegotiator.php
index 74243142f..1e940c959 100755
--- a/core/control/ContentNegotiator.php
+++ b/core/control/ContentNegotiator.php
@@ -1,11 +1,33 @@
handleRequest()
+ */
static function process(HTTPResponse $response) {
if(self::$disabled) return;
@@ -69,6 +94,16 @@ class ContentNegotiator {
$negotiator->$chosenFormat( $response );
}
+ /**
+ * Only sends the HTTP Content-Type as "application/xhtml+xml"
+ * if the template starts with the typical ",
, ).
+ *
+ * @param $response HTTPResponse
+ * @return string
+ * @todo More flexible tag and entity parsing through regular expressions or tag definition lists
+ */
function xhtml(HTTPResponse $response) {
$content = $response->getBody();
@@ -87,6 +122,14 @@ class ContentNegotiator {
return $this->html($response);
}
}
+
+ /*
+ * Sends HTTP Content-Type as "text/html", and replaces existing doctypes with
+ * HTML4.01 Strict.
+ * Replaces self-closing tags like
with unclosed solitary tags like
.
+ * Replaces all occurrences of "application/xhtml+xml" with "text/html" in the template.
+ * Removes "xmlns" attributes and any Pragmas.
+ */
function html(HTTPResponse $response) {
$response->addHeader("Content-type", "text/html; charset=" . self::$encoding);
$response->addHeader("Vary", "Accept");