Skip to content

Re-introduce custom HTML formatting for long messages#641

Merged
7w1 merged 1 commit intoSableClient:devfrom
Septicity:dev
Apr 5, 2026
Merged

Re-introduce custom HTML formatting for long messages#641
7w1 merged 1 commit intoSableClient:devfrom
Septicity:dev

Conversation

@Septicity
Copy link
Copy Markdown
Contributor

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 /rainbow messages.

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:
imageimage

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:
imageimage

(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

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings

AI disclosure:

  • Partially AI assisted (clarify which code was AI assisted and briefly explain what it does).
  • Fully AI generated (explain what all the generated code does in moderate detail).

- 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.
@Septicity Septicity requested review from 7w1 and hazre as code owners April 5, 2026 11:28
@7w1 7w1 added this pull request to the merge queue Apr 5, 2026
Merged via the queue into SableClient:dev with commit 8d55215 Apr 5, 2026
12 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