HTML-escape notification contact names

This commit is contained in:
keithhacks 2023-11-19 23:23:29 +00:00 committed by GitHub
parent 80796a87c7
commit 777d0d45c6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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));
} }
} }