Skip to content

Raw HTML displayed on meeting descriptions (public-facing calendar) - #229

Merged
calebyhan merged 1 commit into
mainfrom
228/meeting-description-raw-html
Sep 9, 2026
Merged

calebyhan merged 1 commit into
mainfrom
228/meeting-description-raw-html

Conversation

@calebyhan

Copy link
Copy Markdown
Contributor

Meeting/event descriptions are authored through RichTextEditor (wired up in CalendarEventForm.tsx line 95), which stores the field as an HTML string (e.g. <p>Join us in <strong>Union 3408</strong>...</p>), not plain text. The public-facing meetings calendar (/frontend/src/app/meetings/page.tsx → CalendarWidget) renders this field via plain JSX interpolation in the "Full page version" day-detail card — <p className="text-gray-600">{event.description}</p> (/frontend/src/components/calendar/CalendarWidget.tsx, lines 304–306). Because React auto-escapes {event.description} as text rather than markup, the meetings page shows the literal tags (<p>, <strong>, etc.) instead of formatted content.

This is inconsistent with the rest of the app: every other place that displays a RichTextEditor-authored field routes it through the HtmlContent component (/frontend/src/components/content/HtmlContent.tsx), which renders via dangerouslySetInnerHTML. This pattern is used for the equivalent committee.description field (/frontend/src/app/committees/[id]/page.tsx lines 37–38), as well as for news and legislation body content. The meetings calendar's day-detail card is one more place this contract is broken.

(The admin Events table at /frontend/src/app/admin/events/page.tsx does not display a description column at all — only title, date/time, location, type, and status — so the admin dashboard grid itself is not affected. The compact calendar widget used on the homepage also omits description entirely. The bug is isolated to the full-size calendar's expanded event card.)

Changes:

  • yup

Closes #228

…ent (#228)

Route event.description through HtmlContent, matching how committees/news/legislation descriptions are displayed.
@github-actions

github-actions Bot commented Sep 8, 2026

Copy link
Copy Markdown

Test Results

642 tests  ±0   642 ✅ ±0   59s ⏱️ -1s
  1 suites ±0     0 💤 ±0 
  1 files   ±0     0 ❌ ±0 

Results for commit 749b8d1. ± Comparison against base commit cef1c86.

@MasonMines2006 MasonMines2006 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

LGTM

@calebyhan
calebyhan merged commit 4b544e6 into main Sep 9, 2026
3 checks passed
@calebyhan
calebyhan deleted the 228/meeting-description-raw-html branch September 9, 2026 01:24
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.

Raw HTML displayed on meeting descriptions (public-facing calendar)

2 participants