Strip html from emoji stuff.

This commit is contained in:
lain 2018-03-23 19:52:08 +01:00
commit fbe9aa3506
2 changed files with 7 additions and 1 deletions

View file

@ -132,6 +132,8 @@ defmodule Pleroma.Formatter do
end
Enum.reduce(all_emoji, text, fn ({emoji, file}, text) ->
emoji = HtmlSanitizeEx.strip_tags(emoji)
file = HtmlSanitizeEx.strip_tags(file)
String.replace(text, ":#{emoji}:", "<img height='32px' width='32px' alt='#{emoji}' title='#{emoji}' src='#{MediaProxy.url(file)}' />")
end)
end