diff options
author | Roman Chvanikov <chvanikoff@gmail.com> | 2019-04-14 14:05:21 +0700 |
---|---|---|
committer | Roman Chvanikov <chvanikoff@gmail.com> | 2019-04-14 14:05:21 +0700 |
commit | 0cd4b6024d043efb096a353d6bd84ea0aeb74a6f (patch) | |
tree | 359bbd63d213dbbf4c798a86e8804eaf6f047234 /lib/pleroma/web/common_api/utils.ex | |
parent | 371a4aed2ca9f6926e49f6791c8b4d14292d20e5 (diff) | |
parent | 7304e0ce18776d4ace969a8a1b737a60635376d6 (diff) | |
download | pleroma-0cd4b6024d043efb096a353d6bd84ea0aeb74a6f.tar.gz |
Merge branch 'develop' of git.pleroma.social:pleroma/pleroma into feature/digest-email
Diffstat (limited to 'lib/pleroma/web/common_api/utils.ex')
-rw-r--r-- | lib/pleroma/web/common_api/utils.ex | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/lib/pleroma/web/common_api/utils.ex b/lib/pleroma/web/common_api/utils.ex index 7b9f0ea06..58a561a40 100644 --- a/lib/pleroma/web/common_api/utils.ex +++ b/lib/pleroma/web/common_api/utils.ex @@ -195,11 +195,10 @@ defmodule Pleroma.Web.CommonAPI.Utils do Formatting text to markdown. """ def format_input(text, "text/markdown", options) do - options = Keyword.put(options, :mentions_escape, true) - text + |> Formatter.mentions_escape(options) + |> Earmark.as_html!() |> Formatter.linkify(options) - |> (fn {text, mentions, tags} -> {Earmark.as_html!(text), mentions, tags} end).() |> Formatter.html_escape("text/html") end |