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

Linkify plain text emails #8585

Draft
wants to merge 1 commit into
base: dev-mail
Choose a base branch
from
Draft

Conversation

hrb-hub
Copy link
Contributor

@hrb-hub hrb-hub commented Feb 21, 2025

No description provided.

@hrb-hub hrb-hub force-pushed the 8568-linkify-plain-text branch from 7a8b118 to 589010c Compare February 21, 2025 09:53
@hrb-hub hrb-hub linked an issue Feb 21, 2025 that may be closed by this pull request
Linkify pass was previously removed in 487fc44 because it interacted
badly with the sanitizer making some html emails display as empty.

Linkifying only plain text mails might be okay...

Close #8568
@hrb-hub hrb-hub force-pushed the 8568-linkify-plain-text branch from 589010c to d2d4d3e Compare February 21, 2025 09:55
let bodyToSanitize: string = rawBody

const headers = await this.getHeaders()
if (headers?.includes("Content-Type: text/plain")) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm a bit reluctant to rely on the headers. If you send an internal email while using "plain-text mode" it won't work. It might also be surprising why it works but only sometimes. I can also see why it might be worth it though.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You're right, maybe it's not worth the confusion. I also found it weird that the example broken mail from the original issue now renders fine, it could be worth investigating. Maybe we can re-enable linkify for all mails.

Moving this to blocked for now.

@hrb-hub hrb-hub marked this pull request as draft February 21, 2025 12:55
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.

Received Plain Text emails missing automatic link highlight
2 participants