aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorRoger Braun <roger@rogerbraun.net>2017-07-31 13:31:21 +0200
committerRoger Braun <roger@rogerbraun.net>2017-07-31 13:31:21 +0200
commit368fa25f1f9aa69963165eadd677d315a4f994f7 (patch)
tree03b44c61352607e72d737bd7cd57bb702859aadf /lib
parent00b722430fd808d92ba18c99a1af21e9f622c2fb (diff)
downloadpleroma-368fa25f1f9aa69963165eadd677d315a4f994f7.tar.gz
Strip all newlines in atom html content to work around mastodon bug.
Diffstat (limited to 'lib')
-rw-r--r--lib/pleroma/web/ostatus/activity_representer.ex2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/pleroma/web/ostatus/activity_representer.ex b/lib/pleroma/web/ostatus/activity_representer.ex
index cf5c89107..03e3d26bd 100644
--- a/lib/pleroma/web/ostatus/activity_representer.ex
+++ b/lib/pleroma/web/ostatus/activity_representer.ex
@@ -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"])},