From b1d90a99add1e4e07ad79aff031075f0e5623dce Mon Sep 17 00:00:00 2001 From: Yuriy Bakhtin Date: Sat, 19 Feb 2022 00:53:46 +0300 Subject: [PATCH] Limit backup duration of RichText editor for 2 hours (#5569) --- CHANGELOG.md | 1 + .../content/resources/js/humhub.ui.richtext.prosemirror.js | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4b434052df..458f2c2c67 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,7 @@ HumHub Changelog - Fix #5479: Fix ContentContainerPermissionAccess without provided container - Fix #5513: Fix PermaLink controller error for content without container - Fix #5517: Don't send "Follows" notification on request friendship +- Fix #5563: Limit backup duration of RichText editor for 2 hours 1.10.3 (December 20, 2021) diff --git a/protected/humhub/modules/content/resources/js/humhub.ui.richtext.prosemirror.js b/protected/humhub/modules/content/resources/js/humhub.ui.richtext.prosemirror.js index 82d9628c87..f0190f566a 100644 --- a/protected/humhub/modules/content/resources/js/humhub.ui.richtext.prosemirror.js +++ b/protected/humhub/modules/content/resources/js/humhub.ui.richtext.prosemirror.js @@ -125,7 +125,7 @@ humhub.module('ui.richtext.prosemirror', function(module, require, $) { } if (Object.keys(backup).length) { - $.cookie(this.options.backupCookieKey, JSON.stringify(backup)); + $.cookie(this.options.backupCookieKey, JSON.stringify(backup), {expires: 120 / 1440/*2 hours*/}); } else { $.cookie(this.options.backupCookieKey, null, {expires: -1}); }