HTML-escape notification contact names

This commit is contained in:
~keith 2023-11-19 18:08:28 -05:00
parent a802fada23
commit e2bfe6dcec
Signed by: keith
GPG key ID: 5BEBEEAB2C73D520

View file

@ -134,6 +134,6 @@ class Notify extends BaseEntity
*/ */
public static function formatMessage(string $name, string $message): string public static function formatMessage(string $name, string $message): string
{ {
return str_replace('{0}', '<span class="contactname">' . BBCode::toPlaintext($name, false) . '</span>', htmlspecialchars($message)); return str_replace('{0}', '<span class="contactname">' . htmlspecialchars(BBCode::toPlaintext($name, false)) . '</span>', htmlspecialchars($message));
} }
} }