From d7daafc4eab487ba28212528bd4daa1f544a4a77 Mon Sep 17 00:00:00 2001 From: Thomas Citharel Date: Tue, 21 Nov 2023 15:40:34 +0100 Subject: [PATCH] fix(export): fix iCalendar export description HTML conversion Paragraphs and line breaks are now properly handled when converting from HTML to text Closes #888 Signed-off-by: Thomas Citharel --- lib/service/export/icalendar.ex | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/service/export/icalendar.ex b/lib/service/export/icalendar.ex index d930f308..0fa8032a 100644 --- a/lib/service/export/icalendar.ex +++ b/lib/service/export/icalendar.ex @@ -8,7 +8,7 @@ defmodule Mobilizon.Service.Export.ICalendar do alias Mobilizon.{Config, Events} alias Mobilizon.Events.{Event, EventOptions} alias Mobilizon.Service.Export.{Cachable, Common} - alias Mobilizon.Service.Formatter.HTML + alias Mobilizon.Service.Formatter.{HTML, Text} @behaviour Cachable @@ -124,7 +124,7 @@ defmodule Mobilizon.Service.Export.ICalendar do dtstart: begins_on(event), dtstamp: event.publish_at || DateTime.utc_now(), dtend: ends_on(event), - description: HTML.strip_tags(event.description), + description: HTML.html_to_text(event.description), uid: event.uuid, url: event.url, status: event.status,