From: Evan Prodromou Date: Tue, 2 Aug 2011 17:49:27 +0000 (-0400) Subject: encode values when inserting into MeteorUpdater JS X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=897e3c87e59b071254fcb0820fa46f3133a69e9d;p=quix0rs-gnu-social.git encode values when inserting into MeteorUpdater JS --- diff --git a/plugins/Meteor/MeteorPlugin.php b/plugins/Meteor/MeteorPlugin.php index 6e93e364f7..3d36c67f57 100644 --- a/plugins/Meteor/MeteorPlugin.php +++ b/plugins/Meteor/MeteorPlugin.php @@ -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()