]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - lib/htmloutputter.php
Merge branch '0.8.x' into 0.9.x
[quix0rs-gnu-social.git] / lib / htmloutputter.php
index 64be745bebe85daa14998d451df7eb5bddda4701..ce83295fb33783f1ddeac61da5ce19a3a2fe69e1 100644 (file)
@@ -106,7 +106,7 @@ class HTMLOutputter extends XMLOutputter
             }
         }
 
-        header('Content-Type: '.$type.'; charset=UTF-8');
+        header('Content-Type: '.$type);
 
         $this->extraHeaders();
         if (preg_match("/.*\/.*xml/", $type)) {
@@ -427,16 +427,12 @@ class HTMLOutputter extends XMLOutputter
     function autofocus($id)
     {
         $this->elementStart('script', array('type' => 'text/javascript'));
-        $this->raw('
-        <!--
-        $(document).ready(function() {
-            var el = $("#' . $id . '");
-            if (el.length) {
-                el.focus();
-            }
-        });
-        -->
-        ');
+        $this->raw('/*<![CDATA[*/'.
+                   ' $(document).ready(function() {'.
+                   ' var el = $("#' . $id . '");'.
+                   ' if (el.length) { el.focus(); }'.
+                   ' });'.
+                   ' /*]]>*/');
         $this->elementEnd('script');
     }
 }