Skip to content
Snippets Groups Projects
Commit 368fa25f authored by lain's avatar lain
Browse files

Strip all newlines in atom html content to work around mastodon bug.

parent 00b72243
Branches
No related tags found
No related merge requests found
......@@ -48,7 +48,7 @@ def to_simple_form(%{data: %{"object" => %{"type" => "Note"}}} = activity, user,
{:"activity:verb", ['http://activitystrea.ms/schema/1.0/post']},
{:id, h.(activity.data["object"]["id"])}, # For notes, federate the object id.
{:title, ['New note by #{user.nickname}']},
{:content, [type: 'html'], h.(activity.data["object"]["content"])},
{:content, [type: 'html'], h.(activity.data["object"]["content"] |> String.replace(~r/[\n\r]/, ""))},
{:published, h.(inserted_at)},
{:updated, h.(updated_at)},
{:"ostatus:conversation", [], h.(activity.data["context"])},
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment