diff options
author | Ariadne Conill <ariadne@dereferenced.org> | 2019-07-29 19:09:58 +0000 |
---|---|---|
committer | Ariadne Conill <ariadne@dereferenced.org> | 2019-07-29 19:09:58 +0000 |
commit | 5795a890e9d14a9e51e2613d26620899b2171623 (patch) | |
tree | 2e3bce5cf458ceb44b048b1740afd8acc0605587 /lib/pleroma/web/common_api/utils.ex | |
parent | 1dfde4151ca096742da593160d33a629494c9f1c (diff) | |
download | pleroma-5795a890e9d14a9e51e2613d26620899b2171623.tar.gz |
markdown: clean up html generated by earmark
Diffstat (limited to 'lib/pleroma/web/common_api/utils.ex')
-rw-r--r-- | lib/pleroma/web/common_api/utils.ex | 3 |
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( |