discourse/plugins/discourse-calendar/app
Régis Hanol 866ae39d46
FEATURE: linkify URLs in calendar event descriptions (#39314)
Event descriptions are stored as plain text (extracted via
`doc.text.strip` from cooked HTML), so any URLs typed by the user were
rendered as non-clickable text in the event popup.

This adds a `description_html` attribute to the event serializer that
linkifies URLs at serialization time via
`EventParser.linkify_description`. The method wraps URL matches in `<a>`
tags and delegates `rel` attribute handling to
`PrettyText.add_rel_attributes_to_user_content`, which respects trust
levels, staff status, domain allowlists, and the
`add_rel_nofollow_to_user_content` site setting.

The raw `description` attribute remains unchanged (plain text) so the
edit form continues to show editable text without HTML markup.

On the client side, the Description component now receives
`@descriptionHtml` and renders it via `trustHTML`. The JS model maps the
new `description_html` field from the API response.

Also removes `text-align: justify` from the description text style.

Ref - t/180829
2026-04-18 16:57:17 +02:00
..
controllers FEAT: add images to post event events (#38643) 2026-04-13 09:45:06 -05:00
models DEV: Fix deprecations in plugins specs and silence output (#39257) 2026-04-15 00:00:46 +02:00
serializers FEATURE: linkify URLs in calendar event descriptions (#39314) 2026-04-18 16:57:17 +02:00
services PERF: clamp the limit of max occurrences (#38326) 2026-03-06 15:19:23 +01:00
views/discourse_post_event/events FEATURE: Add friendly names to calendar subscription feeds (#39154) 2026-04-08 13:34:04 -03:00