forked from potsda.mn/mobilizon
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 <tcit@tcit.fr>
This commit is contained in:
parent
b97f1c997f
commit
d7daafc4ea
|
@ -8,7 +8,7 @@ defmodule Mobilizon.Service.Export.ICalendar do
|
||||||
alias Mobilizon.{Config, Events}
|
alias Mobilizon.{Config, Events}
|
||||||
alias Mobilizon.Events.{Event, EventOptions}
|
alias Mobilizon.Events.{Event, EventOptions}
|
||||||
alias Mobilizon.Service.Export.{Cachable, Common}
|
alias Mobilizon.Service.Export.{Cachable, Common}
|
||||||
alias Mobilizon.Service.Formatter.HTML
|
alias Mobilizon.Service.Formatter.{HTML, Text}
|
||||||
|
|
||||||
@behaviour Cachable
|
@behaviour Cachable
|
||||||
|
|
||||||
|
@ -124,7 +124,7 @@ defmodule Mobilizon.Service.Export.ICalendar do
|
||||||
dtstart: begins_on(event),
|
dtstart: begins_on(event),
|
||||||
dtstamp: event.publish_at || DateTime.utc_now(),
|
dtstamp: event.publish_at || DateTime.utc_now(),
|
||||||
dtend: ends_on(event),
|
dtend: ends_on(event),
|
||||||
description: HTML.strip_tags(event.description),
|
description: HTML.html_to_text(event.description),
|
||||||
uid: event.uuid,
|
uid: event.uuid,
|
||||||
url: event.url,
|
url: event.url,
|
||||||
status: event.status,
|
status: event.status,
|
||||||
|
|
Loading…
Reference in a new issue