diff --git a/components/ILIAS/Form/classes/class.ilTextAreaInputGUI.php b/components/ILIAS/Form/classes/class.ilTextAreaInputGUI.php index 2fca91a422ad..ca51a75619e8 100755 --- a/components/ILIAS/Form/classes/class.ilTextAreaInputGUI.php +++ b/components/ILIAS/Form/classes/class.ilTextAreaInputGUI.php @@ -293,15 +293,17 @@ public function checkInput(): bool public function getInput(): string { + $raw_post_var = (string) ($this->raw($this->getPostVar()) ?? ""); + if ($this->usePurifier() && $this->getPurifier()) { - $value = $this->getPurifier()->purify($this->raw($this->getPostVar())); + $value = $this->getPurifier()->purify($raw_post_var); } else { $allowed = $this->getRteTagString(); if (isset($this->plugins["latex"]) && $this->plugins["latex"] == "latex" && !is_int(strpos($allowed, ""))) { $allowed .= ""; } $value = ($this->getUseRte() || !$this->getUseTagsForRteOnly()) - ? ilUtil::stripSlashes($this->raw($this->getPostVar()), true, $allowed) + ? ilUtil::stripSlashes($raw_post_var, true, $allowed) : $this->str($this->getPostVar()); }