aboutsummaryrefslogtreecommitdiff
path: root/lib/pleroma/formatter.ex
diff options
context:
space:
mode:
authorhref <href@random.sh>2017-12-12 12:30:24 +0100
committerhref <href@random.sh>2017-12-12 12:30:24 +0100
commitf909aec050498a366d8b0ed6c1b5439b5b0891f1 (patch)
treeb5a70483804129db071db78abd06c934a85a19fc /lib/pleroma/formatter.ex
parent8e82547179e3e2dab3fde111f162d07e3fb98df7 (diff)
downloadpleroma-f909aec050498a366d8b0ed6c1b5439b5b0891f1.tar.gz
proxy emojis
(i fix emojos better than gargon but sshhhhh)
Diffstat (limited to 'lib/pleroma/formatter.ex')
-rw-r--r--lib/pleroma/formatter.ex3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/pleroma/formatter.ex b/lib/pleroma/formatter.ex
index c98db2d94..eed5b5786 100644
--- a/lib/pleroma/formatter.ex
+++ b/lib/pleroma/formatter.ex
@@ -1,5 +1,6 @@
defmodule Pleroma.Formatter do
alias Pleroma.User
+ alias Pleroma.Web.MediaProxy
@link_regex ~r/https?:\/\/[\w\.\/?=\-#%&@~\(\)]+[\w\/]/u
def linkify(text) do
@@ -125,7 +126,7 @@ defmodule Pleroma.Formatter do
end
Enum.reduce(all_emoji, text, fn ({emoji, file}, text) ->
- String.replace(text, ":#{emoji}:", "<img height='32px' width='32px' alt='#{emoji}' title='#{emoji}' src='#{file}' />")
+ String.replace(text, ":#{emoji}:", "<img height='32px' width='32px' alt='#{emoji}' title='#{emoji}' src='#{MediaProxy.url(file)}' />")
end)
end