aboutsummaryrefslogtreecommitdiff
path: root/lib/pleroma/web/common_api
diff options
context:
space:
mode:
authorlambda <pleromagit@rogerbraun.net>2017-12-08 12:34:03 +0000
committerlambda <pleromagit@rogerbraun.net>2017-12-08 12:34:03 +0000
commit35cfbf43a00890fd23297fa6f67b23c415d32b04 (patch)
treec88cf1fb24304e44b45fefe7a3a41ece07498779 /lib/pleroma/web/common_api
parent40c30ab895af8bbc5a77feee39f86ada34ffcc88 (diff)
parenta3e68f02330a3c38f1d3f568ad507e5111b82600 (diff)
downloadpleroma-35cfbf43a00890fd23297fa6f67b23c415d32b04.tar.gz
Merge branch 'fix/linkify' into 'develop'
Fix links with HTML elements and/or parentheses. See merge request pleroma/pleroma!38
Diffstat (limited to 'lib/pleroma/web/common_api')
-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 2d9fdaf6c..e60dff7dc 100644
--- a/lib/pleroma/web/common_api/utils.ex
+++ b/lib/pleroma/web/common_api/utils.ex
@@ -62,8 +62,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)