aboutsummaryrefslogtreecommitdiff
path: root/lib/pleroma/web/common_api/utils.ex
diff options
context:
space:
mode:
authorHaelwenn <contact+git.pleroma.social@hacktivis.me>2019-07-29 19:24:14 +0000
committerHaelwenn <contact+git.pleroma.social@hacktivis.me>2019-07-29 19:24:14 +0000
commit83508418fb0b91b1c5af1a3b0bab7b768a6bf6c4 (patch)
tree2e3bce5cf458ceb44b048b1740afd8acc0605587 /lib/pleroma/web/common_api/utils.ex
parent1dfde4151ca096742da593160d33a629494c9f1c (diff)
parent5795a890e9d14a9e51e2613d26620899b2171623 (diff)
downloadpleroma-83508418fb0b91b1c5af1a3b0bab7b768a6bf6c4.tar.gz
Merge branch 'bugfix/clean-up-markdown-rendering' into 'develop'
markdown: clean up html generated by earmark See merge request pleroma/pleroma!1504
Diffstat (limited to 'lib/pleroma/web/common_api/utils.ex')
-rw-r--r--lib/pleroma/web/common_api/utils.ex3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/pleroma/web/common_api/utils.ex b/lib/pleroma/web/common_api/utils.ex
index d80fffa26..6d42ae8ae 100644
--- a/lib/pleroma/web/common_api/utils.ex
+++ b/lib/pleroma/web/common_api/utils.ex
@@ -300,6 +300,9 @@ defmodule Pleroma.Web.CommonAPI.Utils do
|> Earmark.as_html!()
|> Formatter.linkify(options)
|> Formatter.html_escape("text/html")
+ |> (fn {text, mentions, tags} ->
+ {String.replace(text, ~r/\r?\n/, ""), mentions, tags}
+ end).()
end
def make_note_data(