From 04be71ec38b9392ade9bb9bfa3a33c8d3662944a Mon Sep 17 00:00:00 2001 From: Alexander Ebert Date: Thu, 31 Aug 2017 17:33:18 +0200 Subject: [PATCH] Fixed encoding issue with desktop notification --- .../files/js/WoltLabSuite/Core/Notification/Handler.js | 4 ++-- .../install/files/lib/data/session/SessionAction.class.php | 3 +-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/wcfsetup/install/files/js/WoltLabSuite/Core/Notification/Handler.js b/wcfsetup/install/files/js/WoltLabSuite/Core/Notification/Handler.js index 63c7688931..d02eec35d2 100644 --- a/wcfsetup/install/files/js/WoltLabSuite/Core/Notification/Handler.js +++ b/wcfsetup/install/files/js/WoltLabSuite/Core/Notification/Handler.js @@ -7,7 +7,7 @@ * @license GNU Lesser General Public License * @module WoltLabSuite/Core/Notification/Handler */ -define(['Ajax', 'Core', 'EventHandler'], function(Ajax, Core, EventHandler) { +define(['Ajax', 'Core', 'EventHandler', 'StringUtil'], function(Ajax, Core, EventHandler, StringUtil) { "use strict"; if (!('Promise' in window) || !('Notification' in window)) { @@ -225,7 +225,7 @@ define(['Ajax', 'Core', 'EventHandler'], function(Ajax, Core, EventHandler) { if (typeof pollData.notification === 'object' && typeof pollData.notification.message === 'string') { //noinspection JSUnresolvedVariable var notification = new window.Notification(pollData.notification.title, { - body: pollData.notification.message, + body: StringUtil.unescapeHTML(pollData.notification.message), icon: _icon }); notification.onclick = function () { diff --git a/wcfsetup/install/files/lib/data/session/SessionAction.class.php b/wcfsetup/install/files/lib/data/session/SessionAction.class.php index 719b6f6980..7604b5bf63 100644 --- a/wcfsetup/install/files/lib/data/session/SessionAction.class.php +++ b/wcfsetup/install/files/lib/data/session/SessionAction.class.php @@ -52,8 +52,7 @@ class SessionAction extends AbstractDatabaseObjectAction { public function keepAlive() { // ignore sessions created by this request if (WCF::getSession()->lastActivityTime == TIME_NOW) { - // TODO: DEBUG ONLY - //return []; + return []; } // update last activity time -- 2.20.1