Skip to content

fix: allow marquee in inbox message sanitizer - #12

Closed
DJAscendance wants to merge 1 commit into
masterfrom
fix/inbox-marquee-parity
Closed

fix: allow marquee in inbox message sanitizer#12
DJAscendance wants to merge 1 commit into
masterfrom
fix/inbox-marquee-parity

Conversation

@DJAscendance

@DJAscendance DJAscendance commented Aug 19, 2026

Copy link
Copy Markdown
Owner

The inbox sanitizer listed marquee in allowedAttributes but omitted it from allowedTags.

Because allowedTags is the gate, the attribute entry was dead config and the tag was discarded outright: a <marquee> sent as an inbox message was flattened to plain text, losing the tag but keeping its contents. The message board sanitizer allows marquee, so identical markup rendered differently depending on where it was posted.

The change

Adds 'marquee' to the inbox allowedTags list, in the same position the board uses. One line.

Board and inbox now accept an identical tag and attribute set, so a post that renders correctly on a board renders identically when sent as mail.

Verification

  • tsc --noEmit clean
  • Confirmed against sanitize-html 2.10.0 (the version in api/package.json) that <marquee width height direction> now survives the inbox path, and that the attribute allowlist behaves the same as the board's

Notes

The existing marquee entry in allowedAttributes was already present and is left as-is; it becomes live rather than dead with this change.

This reads as an oversight rather than a deliberate restriction, since the attribute entry was already there and the board has always permitted the tag. Worth a second opinion if anyone recalls it being intentional.

Branched from master rather than the branch checked out at the time, which was unrelated map-background work.

Summary by CodeRabbit

  • Bug Fixes
    • Updated inbox content sanitization to support the marquee HTML tag.

The inbox sanitizer listed marquee in allowedAttributes but omitted it
from allowedTags, so the attribute entry was dead config and any marquee
sent as an inbox message was flattened to plain text. The message board
sanitizer allows the tag, so identical markup rendered differently
depending on where it was posted.

Adds marquee to the inbox allowedTags list, in the same position the
board uses. Board and inbox now accept an identical tag and attribute
set, so a post that renders correctly on a board renders identically
when sent as mail.
Copilot AI lite review requested due to automatic review settings August 19, 2026 08:35
@coderabbitai

coderabbitai Bot commented Aug 19, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: d4048711-8196-428a-98ba-145c932c5d47

📥 Commits

Reviewing files that changed from the base of the PR and between 5c4ad75 and 8c46a08.

📒 Files selected for processing (1)
  • api/src/services/inbox/inbox.service.ts

Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review.


📝 Walkthrough

Walkthrough

The inbox HTML sanitization configuration adds another marquee entry to its allowed tag list.

Changes

Inbox sanitization

Layer / File(s) Summary
Allowed HTML tags
api/src/services/inbox/inbox.service.ts
The sanitize method adds marquee to the allowedTags array. The entry duplicates an existing tag.

Estimated code review effort: 1 (Trivial) | ~2 minutes

Merge Risk: ⚪ Minimal · up to 8c46a

This localized change makes inbox marquee handling match the existing board behavior, with no actionable merge-blocking risk remaining after normal checks and review.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the main change: allowing the marquee tag in the inbox message sanitizer.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/inbox-marquee-parity

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

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.

Pull request overview

Updates the API inbox message sanitization allowlist to support the <marquee> tag, aiming to align inbox rendering with the message board sanitizer.

Changes:

  • Adds 'marquee' to the inbox sanitizer allowedTags list.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment on lines 108 to 112
'li',
'main',
'marquee',
'ol',
'p',

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

You're right, and it goes further than a duplicate: the premise of this PR is wrong.

I verified against origin/master. allowedTags already contained 'marquee' at line 128, sorted alphabetically between 'mark' and 'q', so the inbox has always permitted the tag. Running the original config through sanitize-html confirms it: <marquee width="400" direction="left">hi</marquee> passes through unchanged.

Comparing the two tag lists on master, board and inbox are already identical: 76 entries each, same pre-existing 'main' duplicate, nothing present in one and absent from the other. There was no parity bug to fix.

My error was diagnosing from a truncated view of the array. I read the head and tail of the list, saw marquee in allowedAttributes, and inferred it was missing from allowedTags without checking the middle.

Closing this PR rather than fixing the duplicate, since the change is not needed at all. Thanks for the catch.

@DJAscendance

Copy link
Copy Markdown
Owner Author

Closing: the premise was wrong, not just the duplicate line.

allowedTags on master already contains 'marquee' at line 128, so the inbox has always permitted the tag. Board and inbox tag lists are already identical (76 entries each, same pre-existing 'main' duplicate, no difference in either direction). There was no parity bug, so there is nothing to fix here.

Detail in the review thread above.

@DJAscendance
DJAscendance deleted the fix/inbox-marquee-parity branch August 19, 2026 08:46
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