]> 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 c70f965376af91bea815d604b765ca469b9e2484..ce83295fb33783f1ddeac61da5ce19a3a2fe69e1 100644 (file)
@@ -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');
     }
 }