diff --git a/src/Plugin/monitoring/SensorPlugin/PhpNoticesSensorPlugin.php b/src/Plugin/monitoring/SensorPlugin/PhpNoticesSensorPlugin.php
index 52ea5b0..ad58a60 100644
--- a/src/Plugin/monitoring/SensorPlugin/PhpNoticesSensorPlugin.php
+++ b/src/Plugin/monitoring/SensorPlugin/PhpNoticesSensorPlugin.php
@@ -42,7 +42,12 @@ class PhpNoticesSensorPlugin extends WatchdogAggregatorSensorPlugin {
     if (!empty($this->fetchedObject->variables)) {
       $variables = unserialize($this->fetchedObject->variables);
       $variables['%file'] = $this->shortenFilename($variables['%file']);
-      $result->setMessage('@count times: @error', ['@count' => (int) $this->fetchedObject->records_count, '@error' => SafeMarkup::xssFilter(SafeMarkup::format('%type: !message in %function (line %line of %file).', $variables), Xss::getAdminTagList())]);
+      foreach ($variables as $key => $value) {
+        // Remove the sanitation key from the variables array.
+        $variables[substr($key, 1)] = $variables[$key];
+        unset($variables[$key]);
+      }
+      $result->setMessage('@count times: @error', ['@count' => (int) $this->fetchedObject->records_count, '@error' => SafeMarkup::format('type: message in function (Line line of file).', $variables)]);
     };
   }
 
@@ -102,7 +107,7 @@ class PhpNoticesSensorPlugin extends WatchdogAggregatorSensorPlugin {
       $variables['%file'] = $this->shortenFilename($variables['%file']);
       $rows[$delta]['count'] = $row->records_count;
       $rows[$delta]['type'] = $variables['%type'];
-      $rows[$delta]['message'] = SafeMarkup::xssFilter($variables['!message'], Xss::getAdminTagList());
+      $rows[$delta]['message'] = $variables['!message'];
       $rows[$delta]['function'] = $variables['%function'];
       $rows[$delta]['file'] = $variables['%file'] . ':' . $variables['%line'];
     }
diff --git a/src/Plugin/monitoring/SensorPlugin/WatchdogAggregatorSensorPlugin.php b/src/Plugin/monitoring/SensorPlugin/WatchdogAggregatorSensorPlugin.php
index b0b3f3e..1d29773 100644
--- a/src/Plugin/monitoring/SensorPlugin/WatchdogAggregatorSensorPlugin.php
+++ b/src/Plugin/monitoring/SensorPlugin/WatchdogAggregatorSensorPlugin.php
@@ -42,8 +42,9 @@ class WatchdogAggregatorSensorPlugin extends DatabaseAggregatorSensorPlugin impl
       unset($output['result']['#header']['variables']);
       // Replace the message for every row.
       foreach ($output['result']['#rows'] as $delta => $row) {
-        $output['result']['#rows'][$delta]['message'] = Safemarkup::xssFilter(SafeMarkup::format($row['message'], unserialize($row['variables'])), Xss::getAdminTagList());
-        // Do not render the variables in the row.
+        $output['result']['#rows'][$delta]['#markup'] = SafeMarkup::format($row['message'], unserialize($row['variables']));
+        // Do not render the raw message & variables in the row.
+        unset($output['result']['#rows'][$delta]['message']);
         unset($output['result']['#rows'][$delta]['variables']);
       };
     }
