]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
Escaping internal JavaScript
authorSarven Capadisli <csarven@status.net>
Mon, 21 Sep 2009 18:30:22 +0000 (18:30 +0000)
committerSarven Capadisli <csarven@status.net>
Mon, 21 Sep 2009 18:30:22 +0000 (18:30 +0000)
plugins/Realtime/RealtimePlugin.php

index 1703ef0995bcd8fef057a08420c14ab8a9810ae4..7a612a4064ac7bbce5cecdbc7753da45a39e1aec 100644 (file)
@@ -98,9 +98,13 @@ class RealtimePlugin extends Plugin
         }
 
         $action->elementStart('script', array('type' => 'text/javascript'));
-        $action->raw("$(document).ready(function() { ");
-        $action->raw($this->_updateInitialize($timeline, $user_id));
-        $action->raw(" });");
+        $action->raw('
+        <!--
+        $(document).ready(function() {
+            ' . $this->_updateInitialize($timeline, $user_id) . '
+        });
+        -->
+        ');
         $action->elementEnd('script');
 
         return true;