fix(SSO): メールアドレスからコメント・タグを除外 (MisskeyIO#544)

This commit is contained in:
まっちゃとーにゅ 2024-03-20 16:15:21 +09:00 committed by GitHub
parent daf297c9c0
commit c45edf2564
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 16 additions and 19 deletions

View file

@ -0,0 +1,5 @@
const specialCharactersRegexp = /(\(.*?\)|(\+.*(?=@)))/gu;
export function normalizeEmailAddress(email: string | null): string | null {
return email?.replaceAll(specialCharactersRegexp, '') ?? null;
}