diff --git a/src/Navigation/Notifications/Entity/Notify.php b/src/Navigation/Notifications/Entity/Notify.php
index ab042bc9f0..f24ea16ce6 100644
--- a/src/Navigation/Notifications/Entity/Notify.php
+++ b/src/Navigation/Notifications/Entity/Notify.php
@@ -134,6 +134,6 @@ class Notify extends BaseEntity
*/
public static function formatMessage(string $name, string $message): string
{
- return str_replace('{0}', '' . BBCode::toPlaintext($name, false) . '', htmlspecialchars($message));
+ return str_replace('{0}', '' . htmlspecialchars(BBCode::toPlaintext($name, false)) . '', htmlspecialchars($message));
}
}