Skip to content

HTML encode non-ASCII characters - #61

Merged
aviks merged 3 commits into
aviks:masterfrom
bluesmoon:master
Nov 17, 2025
Merged

aviks merged 3 commits into
aviks:masterfrom
bluesmoon:master

Conversation

@bluesmoon

Copy link
Copy Markdown
Collaborator

Since we set Content-Transfer-Encoding to 7bit for HTML messages, we need to ensure that the passed in HTML is 7 bit safe. This is done by replacing any character with higher bits with their HTML entity encoding.

There may be more efficient ways to achieve this, but I've found that working on the string character by character results in the fewest allocations.

Since we set `Content-Transfer-Encoding` to `7bit` for HTML messages, we need to ensure that the passed in HTML is 7 bit safe. This is done by replacing any character with higher bits with their HTML entity encoding.

There may be more efficient ways to achieve this, but I've found that working on the string character by character results in the fewest allocations.
@bluesmoon

Copy link
Copy Markdown
Collaborator Author

Hi @aviks, any luck getting this in?

@aviks

aviks commented Nov 15, 2025

Copy link
Copy Markdown
Owner

Yeah, working on fixing the tests.

@aviks

aviks commented Nov 16, 2025

Copy link
Copy Markdown
Owner

Hi, would you be able to rebase this on top of master please? Tests should pass after that.

@aviks
aviks merged commit 630ce93 into aviks:master Nov 17, 2025
6 checks passed
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.

2 participants