From 84ab1725b31ae06a3d443d60584f7a2108953bfe Mon Sep 17 00:00:00 2001
From: Moritz Strohm <strohm@data-quest.de>
Date: Tue, 9 Aug 2022 10:13:16 +0000
Subject: [PATCH] fixed storing of WYSIWYG text as HTML, closes #1178

Closes #1178

Merge request studip/studip!878
---
 lib/classes/forms/I18n_formattedInput.php | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/lib/classes/forms/I18n_formattedInput.php b/lib/classes/forms/I18n_formattedInput.php
index 842a76750a8..e546c78647c 100644
--- a/lib/classes/forms/I18n_formattedInput.php
+++ b/lib/classes/forms/I18n_formattedInput.php
@@ -44,6 +44,12 @@ class I18n_formattedInput extends Input
 
     public function getRequestValue()
     {
-        return \Request::i18n($this->name);
+        $output = \Request::i18n($this->name);
+        if (\Studip\Markup::editorEnabled()) {
+            $output = \Studip\Markup::purifyHtml(
+                \Studip\Markup::markAsHtml($output)
+            );
+        }
+        return $output;
     }
 }
-- 
GitLab