aboutsummaryrefslogtreecommitdiff
path: root/lib/pleroma/web/common_api/utils.ex
diff options
context:
space:
mode:
authoreal <eal@waifu.club>2017-12-07 21:34:25 +0200
committereal <eal@waifu.club>2017-12-07 21:36:06 +0200
commitbf91e5659ffd03b15110b6f1094b30aed940e45b (patch)
treeedb1dec37e87692bd4174bff4cf6564f001d1915 /lib/pleroma/web/common_api/utils.ex
parentafd0ea37f3284bdfa6ddce99162601615b7ad845 (diff)
downloadpleroma-bf91e5659ffd03b15110b6f1094b30aed940e45b.tar.gz
Fix HTML escape breaking some links.
Diffstat (limited to 'lib/pleroma/web/common_api/utils.ex')
-rw-r--r--lib/pleroma/web/common_api/utils.ex4
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 1a23b1ad2..f46db4cf0 100644
--- a/lib/pleroma/web/common_api/utils.ex
+++ b/lib/pleroma/web/common_api/utils.ex
@@ -58,8 +58,8 @@ defmodule Pleroma.Web.CommonAPI.Utils do
end
def format_input(text, mentions, _tags) do
- Phoenix.HTML.html_escape(text)
- |> elem(1)
+ text
+ |> Formatter.html_escape
|> Formatter.linkify
|> String.replace("\n", "<br>")
|> add_user_links(mentions)