discourse/plugins/discourse-calendar/spec/lib
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
..
discourse_post_event FEATURE: linkify URLs in calendar event descriptions (#39314) 2026-04-18 16:57:17 +02:00
calendar_first_day_of_week_spec.rb DEV: Clean up scope resolution operators in plugins (#34979) 2025-09-30 14:36:34 +02:00
calendar_settings_validator_spec.rb
calendar_spec.rb
group_timezones_spec.rb
users_on_holiday_spec.rb