From: Craig Andrews Date: Sat, 5 Dec 2009 00:44:45 +0000 (-0500) Subject: only write the javascript CDATA blocks if the type is javascript (it's not the correc... X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=847013db692303cde10f5f161d9fedd787421a37;p=quix0rs-gnu-social.git only write the javascript CDATA blocks if the type is javascript (it's not the correct syntax for other languages) --- diff --git a/lib/htmloutputter.php b/lib/htmloutputter.php index a0066594f2..539e356e82 100644 --- a/lib/htmloutputter.php +++ b/lib/htmloutputter.php @@ -367,7 +367,7 @@ class HTMLOutputter extends XMLOutputter * output a script (almost always javascript) tag with inline * code. * - * @param string $code relative or absolute script path + * @param string $code code to put in the script tag * @param string $type 'type' attribute value of the tag * * @return void @@ -376,9 +376,13 @@ class HTMLOutputter extends XMLOutputter function inlineScript($code, $type='text/javascript') { $this->elementStart('script', array('type' => $type)); - $this->raw('/*raw('/*raw($code); - $this->raw(' /*]]>*/'); // XHTML compat for Safari + if($type == 'text/javascript') { + $this->raw(' /*]]>*/'); // XHTML compat + } $this->elementEnd('script'); }