summaryrefslogtreecommitdiff
path: root/lib/htmloutputter.php
diff options
context:
space:
mode:
Diffstat (limited to 'lib/htmloutputter.php')
-rw-r--r--lib/htmloutputter.php19
1 files changed, 11 insertions, 8 deletions
diff --git a/lib/htmloutputter.php b/lib/htmloutputter.php
index 539e356e8..0c2d18da3 100644
--- a/lib/htmloutputter.php
+++ b/lib/htmloutputter.php
@@ -375,15 +375,18 @@ class HTMLOutputter extends XMLOutputter
function inlineScript($code, $type='text/javascript')
{
- $this->elementStart('script', array('type' => $type));
- if($type == 'text/javascript') {
- $this->raw('/*<![CDATA[*/ '); // XHTML compat
- }
- $this->raw($code);
- if($type == 'text/javascript') {
- $this->raw(' /*]]>*/'); // XHTML compat
+ if(Event::handle('StartInlineScriptElement', array($this,&$code,&$type))) {
+ $this->elementStart('script', array('type' => $type));
+ if($type == 'text/javascript') {
+ $this->raw('/*<![CDATA[*/ '); // XHTML compat
+ }
+ $this->raw($code);
+ if($type == 'text/javascript') {
+ $this->raw(' /*]]>*/'); // XHTML compat
+ }
+ $this->elementEnd('script');
+ Event::handle('EndInlineScriptElement', array($this,$code,$type));
}
- $this->elementEnd('script');
}
/**