fehlerhaftes Erstellen von geschachtelten p-Tags behoben

This commit is contained in:
Matthias Grief
2025-01-06 17:04:46 +01:00
parent 2c11887ce6
commit 062b0f25db

View File

@@ -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]*<p><p>/", "<p>", $article);
$article = preg_replace("#</p></p>[ \r\n\t]*$#", "</p>", $article);
if (isset($allSubjects[$_POST['subjectId']]->getTopics()[$_POST['id']])) {
$newTopic = $allSubjects[$_POST['subjectId']]->getTopics()[$_POST['id']];