aboutsummaryrefslogtreecommitdiff
path: root/lib/pleroma/web/common_api/utils.ex
diff options
context:
space:
mode:
authorAlex S <alex.strizhakov@gmail.com>2019-04-13 12:24:38 +0700
committerAlex S <alex.strizhakov@gmail.com>2019-04-13 12:24:38 +0700
commitc349573791bfaca6e8c8c86c519c23397b088967 (patch)
treed98225031c8ad1b3efe7c2917fd911d369953ca7 /lib/pleroma/web/common_api/utils.ex
parenta64eb2b3893cee61f50d89b6ad4d273031ef0ea9 (diff)
parent334b2d78dc068f65fabf5b11aaa737dfd742d2f4 (diff)
downloadpleroma-c349573791bfaca6e8c8c86c519c23397b088967.tar.gz
Merge develop to 788-separate-email-addresses
Merge conflicts: test/web/twitter_api/twitter_api_test.exs test/web/twitter_api/twitter_api_controller_test.exs test/web/admin_api/admin_api_controller_test.exs
Diffstat (limited to 'lib/pleroma/web/common_api/utils.ex')
-rw-r--r--lib/pleroma/web/common_api/utils.ex5
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