diff options
-rw-r--r-- | core/helpers/rest.php | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/core/helpers/rest.php b/core/helpers/rest.php index f1c191c2..bb2e8f1a 100644 --- a/core/helpers/rest.php +++ b/core/helpers/rest.php @@ -76,10 +76,16 @@ class rest_Core { public static function output_format() { // Pick a format, but let it be overridden. $input = Input::instance(); - return $input->get( + $fmt = $input->get( "_format", $input->post( "_format", request::preferred_accept( - array("html", "xml", "json")))); + array("xhtml", "html", "xml", "json")))); + + // Some browsers (Chrome!) prefer xhtml over html, but we'll normalize this to html for now. + if ($fmt == "xhtml") { + $fmt = "html"; + } + return $fmt; } /** |