From: Craig Andrews Date: Sat, 5 Dec 2009 01:33:41 +0000 (-0500) Subject: Use inlineScript() instead of element() to write inline javascript X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=d41a0a5ed03b2f4bbf8e8b3984960103383090d1;p=quix0rs-gnu-social.git Use inlineScript() instead of element() to write inline javascript --- diff --git a/lib/htmloutputter.php b/lib/htmloutputter.php index a88a5b82c5..cf93944e76 100644 --- a/lib/htmloutputter.php +++ b/lib/htmloutputter.php @@ -477,13 +477,10 @@ class HTMLOutputter extends XMLOutputter */ function autofocus($id) { - $this->elementStart('script', array('type' => 'text/javascript')); - $this->raw('/*inlineScript( ' $(document).ready(function() {'. ' var el = $("#' . $id . '");'. ' if (el.length) { el.focus(); }'. - ' });'. - ' /*]]>*/'); - $this->elementEnd('script'); + ' });'); } } diff --git a/plugins/MobileProfile/MobileProfilePlugin.php b/plugins/MobileProfile/MobileProfilePlugin.php index 8b5e5f31da..35678bedd3 100644 --- a/plugins/MobileProfile/MobileProfilePlugin.php +++ b/plugins/MobileProfile/MobileProfilePlugin.php @@ -352,8 +352,7 @@ class MobileProfilePlugin extends WAP20Plugin $contentLimit = Notice::maxContent(); - $form->out->element('script', array('type' => 'text/javascript'), - 'maxLength = ' . $contentLimit . ';'); + $form->out->inlineScript('maxLength = ' . $contentLimit . ';'); if ($contentLimit > 0) { $form->out->element('div', array('id' => 'notice_text-count'),