diff --git a/webseite/topicEditor.php b/webseite/topicEditor.php index e322136..b3669cd 100644 --- a/webseite/topicEditor.php +++ b/webseite/topicEditor.php @@ -154,9 +154,8 @@ if ($_SERVER['REQUEST_METHOD'] == 'POST') { $formulas[] = new Task($text, $answers); } - $article = htmlentities($_POST['article'], ENT_HTML401, 'UTF-8'); + $article = mb_convert_encoding($_POST['article'], 'HTML-ENTITIES', 'UTF-8'); $dom = new DOMDocument(); - $dom->encoding = 'UTF-8'; $dom->loadHTML($article, LIBXML_HTML_NOIMPLIED | LIBXML_HTML_NODEFDTD); $htmlImages = $dom->getElementsByTagName('img'); $newImages = array();