1
0
mirror of https://git.pleroma.social/sjw/pleroma.git synced 2024-12-28 01:45:10 +01:00

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

This commit is contained in:
Roger Braun 2017-07-31 13:31:21 +02:00
parent 00b722430f
commit 368fa25f1f

View File

@ -48,7 +48,7 @@ defmodule Pleroma.Web.OStatus.ActivityRepresenter do
{:"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"])},