diff --git a/lib/web/api.js b/lib/web/api.js index 8a100e5..6357eda 100644 --- a/lib/web/api.js +++ b/lib/web/api.js @@ -102,7 +102,7 @@ function deletionReason(value) { } const reason = String(value ?? "") - .replace(/[<>]/g, "") + .replace(/<@([A-Z0-9]+)>|[<>]/g, (match, userId) => (userId ? match : "")) .trim(); if (!reason) throw new Error("A reason is required, and is recorded in the audit log."); if (reason.length > 500) {