Fix HTML escape breaking some links.

This commit is contained in:
eal 2017-12-07 21:34:25 +02:00
commit bf91e5659f
2 changed files with 11 additions and 2 deletions

View file

@ -24,6 +24,15 @@ defmodule Pleroma.Formatter do
|> Enum.filter(fn ({_match, user}) -> user end)
end
def html_escape(text) do
Regex.split(@link_regex, text, include_captures: true)
|> Enum.map_every(2, fn chunk ->
{:safe, part} = Phoenix.HTML.html_escape(chunk)
part
end)
|> Enum.join("")
end
@finmoji [
"a_trusted_friend",
"alandislands",