Skip to content

Add regression test for dir attribute preservation in email sanitizer - #745

Draft
rathlinus with Copilot wants to merge 1 commit into
mainfrom
copilot/fix-code-review-comment-713
Draft

Add regression test for dir attribute preservation in email sanitizer#745
rathlinus with Copilot wants to merge 1 commit into
mainfrom
copilot/fix-code-review-comment-713

Conversation

Copilot AI commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

This addresses the PR review comment requesting coverage for the newly allowed dir attribute in EMAIL_SANITIZE_CONFIG. The change is scoped to a focused regression test to prevent future sanitizer regressions affecting RTL content.

  • What changed

    • Added a unit test for sanitizeEmailHtml asserting that dir is preserved on sanitized elements (example: <p dir="rtl">...</p>).
  • Why this matters

    • Ensures the sanitizer behavior matches the attribute allowlist update and protects RTL rendering support from accidental breakage.
  • Example assertion

    expect(sanitizeEmailHtml('<p dir="rtl">مرحبا</p>'))
      .toContain('<p dir="rtl">مرحبا</p>');

Copilot AI lite review requested due to automatic review settings August 5, 2026 22:37

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot wasn't able to review any files in this pull request.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copilot AI changed the title [WIP] Fix code as per review comment in PR 713 Add regression test for dir attribute preservation in email sanitizer Aug 5, 2026
Copilot AI requested a review from rathlinus August 5, 2026 22:38
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.

3 participants