aboutsummaryrefslogtreecommitdiff
path: root/lib/pleroma/formatter.ex
diff options
context:
space:
mode:
authorlain <lain@soykaf.club>2018-03-23 19:52:08 +0100
committerlain <lain@soykaf.club>2018-03-23 19:52:08 +0100
commitfbe9aa3506807b5c0f30ea8e877193a0b5ae91a6 (patch)
treec6b5617e1de6b51c05727147096ca15326c4bd30 /lib/pleroma/formatter.ex
parent5da2355e715722f2f80a7587264a08d4281cb519 (diff)
downloadpleroma-fbe9aa3506807b5c0f30ea8e877193a0b5ae91a6.tar.gz
Strip html from emoji stuff.
Diffstat (limited to 'lib/pleroma/formatter.ex')
-rw-r--r--lib/pleroma/formatter.ex2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/pleroma/formatter.ex b/lib/pleroma/formatter.ex
index fdf91f56e..fd8465c1c 100644
--- a/lib/pleroma/formatter.ex
+++ b/lib/pleroma/formatter.ex
@@ -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