|> 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",
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)