fix(email): add <hr> to HTML body detection tag list - #40
Merged
Conversation
<hr> is a self-closing void element commonly used as a divider in HTML emails. Without it in _HTML_TAGS, emails whose only HTML marker is a horizontal rule were sent as plain text instead of multipart/alternative. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
🔎 Lint report:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds
<hr>to_HTML_TAGSingateway/platforms/email.py. The<hr>void element is commonly used as a horizontal divider in HTML emails; without it, emails whose only HTML marker was<hr>were classified as plain text and sent without themultipart/alternativewrapper.Supersedes #38 (had unsigned commits; rewritten with a signed commit).
Test plan
<hr>as its HTML indicator — should be detected as HTML and sent asmultipart/alternative🤖 Generated with Claude Code
Note
Low Risk
Single-tag addition to an existing HTML-detection regex; no auth, SMTP, or IMAP logic changes.
Overview
Adds
hrto the_HTML_TAGSpattern used by_HTML_BODY_RE/_is_html_bodyin the email gateway.Bodies that only include a horizontal rule (e.g.
<hr>or<hr/>) are now treated as HTML instead of plain text, so_attach_bodykeeps the markup in the HTML part and strips it for the plain alternative rather than escaping the whole body as preformatted text.Reviewed by Cursor Bugbot for commit ad0a3b3. Configure here.