diff --git a/webseite/topicEditor.php b/webseite/topicEditor.php index a3b7655..040092e 100644 --- a/webseite/topicEditor.php +++ b/webseite/topicEditor.php @@ -189,6 +189,8 @@ if ($_SERVER['REQUEST_METHOD'] == 'POST') { // extension=mbstring in php.ini muss aktiviert sein! $article = mb_convert_encoding($dom->saveHTML(), 'UTF-8', 'HTML-ENTITIES'); + $article = preg_replace("/^[ \r\n\t]*
/", "
", $article); + $article = preg_replace("#
[ \r\n\t]*$#", "", $article); if (isset($allSubjects[$_POST['subjectId']]->getTopics()[$_POST['id']])) { $newTopic = $allSubjects[$_POST['subjectId']]->getTopics()[$_POST['id']];