encode values when inserting into MeteorUpdater JS

This commit is contained in:
Evan Prodromou 2011-08-02 13:49:27 -04:00
parent 10ce44c297
commit 897e3c87e5

View File

@ -96,7 +96,11 @@ class MeteorPlugin extends RealtimePlugin
function _updateInitialize($timeline, $user_id)
{
$script = parent::_updateInitialize($timeline, $user_id);
return $script." MeteorUpdater.init(\"$this->webserver\", $this->webport, \"{$timeline}\");";
$ours = sprintf("MeteorUpdater.init(%s, %s, %s);",
json_encode($this->webserver),
json_encode($this->webport),
json_encode($timeline));
return $script." ".$ours;
}
function _connect()