diff options
author | eal <eal@waifu.club> | 2017-11-18 14:46:54 +0200 |
---|---|---|
committer | eal <eal@waifu.club> | 2017-11-18 14:46:54 +0200 |
commit | fb118b2978686a44a15534b638ab7887fb38c03d (patch) | |
tree | de4e10663cb462972073ddf05449ed44f3818c44 /lib | |
parent | 66e78c3ec4e524a31a4c12f4dbe682ccbbc0025d (diff) | |
download | pleroma-fb118b2978686a44a15534b638ab7887fb38c03d.tar.gz |
Don't insert newlines to generated HTML.
MastoFE doesn't like them.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/pleroma/web/common_api/utils.ex | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/pleroma/web/common_api/utils.ex b/lib/pleroma/web/common_api/utils.ex index 21b6226b1..7cce77b10 100644 --- a/lib/pleroma/web/common_api/utils.ex +++ b/lib/pleroma/web/common_api/utils.ex @@ -54,14 +54,14 @@ defmodule Pleroma.Web.CommonAPI.Utils do "<a href=\"#{href}\" class='attachment'>#{shortname(name)}</a>" _ -> "" end) - Enum.join([text | attachment_text], "<br>\n") + Enum.join([text | attachment_text], "<br>") end def format_input(text, mentions, tags) do Phoenix.HTML.html_escape(text) |> elem(1) |> Formatter.linkify - |> String.replace("\n", "<br>\n") + |> String.replace("\n", "<br>") |> add_user_links(mentions) # |> add_tag_links(tags) end |