diff --git a/library/Icinga/Web/Controller/ActionController.php b/library/Icinga/Web/Controller/ActionController.php index e2c514f82f..6d78dac3ad 100644 --- a/library/Icinga/Web/Controller/ActionController.php +++ b/library/Icinga/Web/Controller/ActionController.php @@ -420,7 +420,7 @@ public function postDispatch() $notifications = Notification::getInstance(); if ($isXhr && ! $this->isRedirect && $notifications->hasMessages()) { foreach ($notifications->getMessages() as $m) { - header('X-Icinga-Notification: ' . $m->type . ' ' . $m->message); + header('X-Icinga-Notification: ' . rawurlencode($m->type . ' ' . $m->message)); } } @@ -442,7 +442,7 @@ public function postDispatch() // TODO: Innocent exception and error log for hack attempts throw new Exception('No way, guy'); } - header('X-Icinga-Title: ' . $this->view->title . ' :: Icinga Web'); + header('X-Icinga-Title: ' . rawurlencode($this->view->title . ' :: Icinga Web')); } // TODO: _render=layout? if ($this->getParam('_render') === 'layout') { diff --git a/public/js/icinga/loader.js b/public/js/icinga/loader.js index 11954a2513..3ed006eaed 100644 --- a/public/js/icinga/loader.js +++ b/public/js/icinga/loader.js @@ -287,6 +287,9 @@ } var notifications = req.getResponseHeader('X-Icinga-Notification'); + if (notifications) { + notifications = decodeURIComponent(notifications); + } var target = req.getResponseHeader('X-Icinga-Container'); var newBody = false;