Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cleanup unicode emojis from email headers #8421

Merged

Conversation

SuperTux88
Copy link
Member

Some email providers (for example gmail) block emails if they have emojis in the from header, as they could be confused with UI elements. So the easy solution is to just filter all emojis from the name.

The normal \p{Emoji} selector also matches normal numbers, because of the emoji-version of numbers (1️⃣), but the \p{Emoji_Presentation} then doesn't match colored emojis anymore (❄️), so we need a mix of both to find all emojis

Some email providers (for example gmail) block emails if they have
emojis in the from header, as they could be confused with UI elements.
So the easy solution is to just filter all emojis from the name.

The normal `\p{Emoji}` selector also matches normal numbers, because of
the emoji-version of numbers (1️⃣), but the `\p{Emoji_Presentation}` then
doesn't match colored emojis anymore (❄️), so we need a mix of both to
find all emojis
@SuperTux88 SuperTux88 added this to the 1.0.0 milestone Jun 9, 2023
@Flaburgan
Copy link
Member

But do we want to keep support for emoji numbers? We can simply remove them too, or replace them with real font numbers?

Abeanna

This comment was marked as spam.

@SuperTux88
Copy link
Member Author

But do we want to keep support for emoji numbers? We can simply remove them too, or replace them with real font numbers?

I don't think it's worth replacing anything, just removing them should be "good enough" here (that's what I did). Also, if we know which emojis gmail is blocking, we could only remove these and leave the others, but I didn't find a complete list (I only learned about this because some mails from my pod got rejected), and also maintaining a list (as it maybe needs to be updated) is also a lot more work than just dropping all of them.

@SuperTux88 SuperTux88 merged commit 02182e3 into diaspora:develop Jun 10, 2023
8 checks passed
@SuperTux88 SuperTux88 deleted the cleanup-from-header-unicode-emojis branch June 10, 2023 15:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants