Merge branch 'fix/linkify' into 'develop'

Fix links with HTML elements and/or parentheses.

See merge request pleroma/pleroma!38
This commit is contained in:
lambda 2017-12-08 12:34:03 +00:00
commit 35cfbf43a0
3 changed files with 22 additions and 3 deletions

View file

@ -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)