Re-introduce custom HTML formatting for long messages#641
Merged
7w1 merged 1 commit intoSableClient:devfrom Apr 5, 2026
Merged
Re-introduce custom HTML formatting for long messages#6417w1 merged 1 commit intoSableClient:devfrom
7w1 merged 1 commit intoSableClient:devfrom
Conversation
- The issue that this was originally removed to fix was actually only related to jumbo emojis. - Since I've kept the safety mechanisms for jumbo emojis, there should be no regression.
7w1
approved these changes
Apr 5, 2026
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.
Description
For long formatted messages (specifically, messages with over 8000 characters in their internal source), styles are disabled. I personally noticed this when trying to use
/rainbowmessages.I noticed that this regression was caused by this commit; while sanitizing the formatted body of a long message was safe for the specific message in the channel that was linked in the issue, it ended up disabling all HTML formatting for longer messages.
Here, you can see the result of my fix:


Specifically, I've determined that the cause of the original crash was specifically only related to jumbo emojis; as I've kept the safeguard regarding jumbo emojis, this still prevents the crash, as well as keeping any spacing or line breaks in a message with many emojis. Here's the difference:


(I'm considering this a breaking change because, as far as I can tell, this does technically make emojis no longer jumbo in longer messages. I could be wrong, though.)
Type of change
Checklist:
AI disclosure: