discourse/plugins/discourse-calendar/spec/requests
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
..
admin DEV: Update rubocop-discourse to 3.13 and autofix issues (#35073) 2025-10-06 16:11:01 +02:00
api FEATURE: linkify URLs in calendar event descriptions (#39314) 2026-04-18 16:57:17 +02:00
calendar_subscriptions_spec.rb FEATURE: Add calendar subscription URLs to user preferences (#38598) 2026-03-17 10:28:20 -03:00
events_controller_spec.rb FEATURE: Add friendly names to calendar subscription feeds (#39154) 2026-04-08 13:34:04 -03:00
invitees_controller_spec.rb FIX: Add missing checks to InviteesController and convert to services (#38023) 2026-02-25 10:58:16 +01:00
site_spec.rb
sort_event_topics_spec.rb DEV: Update rubocop-discourse to 3.13 and autofix issues (#35073) 2025-10-06 16:11:01 +02:00