diff --git a/app/controllers/module/module.php b/app/controllers/module/module.php
index b05f09701e68f0d20341e0e7592feb14c0ce2b4d..449254a6f5c63d987f1abaa58f42978b6ebb4d2e 100644
--- a/app/controllers/module/module.php
+++ b/app/controllers/module/module.php
@@ -1118,6 +1118,9 @@ class Module_ModuleController extends MVVController
                 $type_old = 2;
             }
 
+            $diff_config = new Caxy\HtmlDiff\HtmlDiffConfig();
+            $diff_config->setPurifierCacheLocation($GLOBALS['TMP_PATH']);
+
             PageLayout::setTitle(_('Vergleichsansicht'));
             PageLayout::addStylesheet('print.css');
             $factory = $this->get_template_factory();
@@ -1128,7 +1131,8 @@ class Module_ModuleController extends MVVController
                 'old_module' => $old_module,
                 'type_new'   => $type_new,
                 'type_old'   => $type_old,
-                'plugin'   => $this->plugin
+                'plugin'   => $this->plugin,
+                'diff_config' => $diff_config,
             ]);
 
             $this->render_text($template->render());
diff --git a/app/controllers/shared/log_event.php b/app/controllers/shared/log_event.php
index e88241f8e0d493b904745974fc91dd8cf6e94c1f..0355e45d789bc69c19c9cb7c8161cbaa299addf4 100644
--- a/app/controllers/shared/log_event.php
+++ b/app/controllers/shared/log_event.php
@@ -127,7 +127,7 @@ class Shared_LogEventController extends MVVController
                         LEFT JOIN `log_actions` ON `log_events`.`action_id` =  `log_actions`.`action_id`
                         WHERE `info` = ?
                         " . $search_action . "
-                        ORDER BY `mkdate` DESC");
+                        ORDER BY `log_events`.`mkdate` DESC");
                 $statement->execute([$mvv_field]);
                 $res = $statement->fetchOne();
                 if ($res) {
diff --git a/app/views/module/module/diff.php b/app/views/module/module/diff.php
index 0aaae62bb2f37752656fcb1a492eb331cf07dc8a..923923d551039a310b1ec5c9370cb61c6272dbc8 100644
--- a/app/views/module/module/diff.php
+++ b/app/views/module/module/diff.php
@@ -66,7 +66,7 @@
     <?php
     $old  = $this->render_partial('shared/modul/_modul', ['modul' => $old_module]);
     $new  = $this->render_partial('shared/modul/_modul', ['modul' => $new_module]);
-    $diff = new Caxy\HtmlDiff\HtmlDiff($old, $new);
+    $diff = Caxy\HtmlDiff\HtmlDiff::create($old, $new, $diff_config);
     $diff->build();
     echo $diff->getDifference();
     ?>
@@ -77,19 +77,19 @@
             <?php
             $old  = $this->render_partial('shared/modul/_modullvs', ['modul' => $old_module]);
             $new  = $this->render_partial('shared/modul/_modullvs', ['modul' => $new_module]);
-            $diff = new Caxy\HtmlDiff\HtmlDiff($old, $new);
+            $diff = Caxy\HtmlDiff\HtmlDiff::create($old, $new, $diff_config);
             $diff->build();
             echo $diff->getDifference();
 
             $old  = $this->render_partial('shared/modul/_pruefungen', ['modul' => $old_module]);
             $new  = $this->render_partial('shared/modul/_pruefungen', ['modul' => $new_module]);
-            $diff = new Caxy\HtmlDiff\HtmlDiff($old, $new);
+            $diff = Caxy\HtmlDiff\HtmlDiff::create($old, $new, $diff_config);
             $diff->build();
             echo $diff->getDifference();
 
             $old  = $this->render_partial('shared/modul/_regularien', ['modul' => $old_module]);
             $new  = $this->render_partial('shared/modul/_regularien', ['modul' => $new_module]);
-            $diff = new Caxy\HtmlDiff\HtmlDiff($old, $new);
+            $diff = Caxy\HtmlDiff\HtmlDiff::create($old, $new, $diff_config);
             $diff->build();
             echo $diff->getDifference();
             ?>
@@ -119,7 +119,7 @@
             <?
             $old  = $this->render_partial('shared/modul/_modullv', ['modul' => $old_module]);
             $new  = $this->render_partial('shared/modul/_modullv', ['modul' => $new_module]);
-            $diff = new Caxy\HtmlDiff\HtmlDiff($old, $new);
+            $diff = Caxy\HtmlDiff\HtmlDiff::create($old, $new, $diff_config);
             $diff->build();
             echo $diff->getDifference();
             ?>
@@ -148,7 +148,7 @@
             <?php
             $old  = $this->render_partial('shared/modul/_modul_ohne_lv', ['modul' => $old_module]);
             $new  = $this->render_partial('shared/modul/_modul_ohne_lv', ['modul' => $new_module]);
-            $diff = new Caxy\HtmlDiff\HtmlDiff($old, $new);
+            $diff = Caxy\HtmlDiff\HtmlDiff::create($old, $new, $diff_config);
             $diff->build();
             echo $diff->getDifference();
             ?>