]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - lib/htmloutputter.php
Use inlineScript() instead of element() to write inline javascript
[quix0rs-gnu-social.git] / lib / htmloutputter.php
index a88a5b82c5066523634c7f84a68ffae55d697344..cf93944e76afe19120c66dbddf124adcd422ebc6 100644 (file)
@@ -477,13 +477,10 @@ class HTMLOutputter extends XMLOutputter
     */
     function autofocus($id)
     {
-        $this->elementStart('script', array('type' => 'text/javascript'));
-        $this->raw('/*<![CDATA[*/'.
+        $this->inlineScript(
                    ' $(document).ready(function() {'.
                    ' var el = $("#' . $id . '");'.
                    ' if (el.length) { el.focus(); }'.
-                   ' });'.
-                   ' /*]]>*/');
-        $this->elementEnd('script');
+                   ' });');
     }
 }