From 5092d7557368c666b32524b1ccb4bea38b003818 Mon Sep 17 00:00:00 2001 From: Matthias Grief Date: Sun, 22 Dec 2024 19:48:25 +0100 Subject: [PATCH] =?UTF-8?q?EOL-Zeichen=20in=20Erkl=C3=A4rtextdateien=20auc?= =?UTF-8?q?h=20im=20HTML=20ber=C3=BCcksichtigt?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- webseite/classes/TopicData.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/webseite/classes/TopicData.php b/webseite/classes/TopicData.php index ba32690..fd3de5f 100644 --- a/webseite/classes/TopicData.php +++ b/webseite/classes/TopicData.php @@ -513,7 +513,12 @@ class TopicData */ public function getFinishedArticle(): string { - return str_replace('$TOPICPATH', Config::getTopicDirectory($this->subjectId, $this->id) . "images", $this->article); + $a = str_replace('$TOPICPATH', Config::getTopicDirectory($this->subjectId, $this->id) . "images", $this->article); + $a = str_replace("\r\n", "
", $a); + $a = str_replace("\r", "
", $a); + $a = str_replace("\n", "
", $a); + + return $a; } public function getArticle(): string