URI.encode custom emojis
authorMark Felder <feld@feld.me>
Tue, 5 Jan 2021 18:25:30 +0000 (12:25 -0600)
committerMark Felder <feld@feld.me>
Tue, 5 Jan 2021 18:29:51 +0000 (12:29 -0600)
lib/pleroma/web/activity_pub/transmogrifier.ex

index 565d324330b751ca35bc65dfbdb3589e993f6a4c..5499f8a0895318f6105bea39137404687e23b655 100644 (file)
@@ -919,7 +919,7 @@ defmodule Pleroma.Web.ActivityPub.Transmogrifier do
 
   defp build_emoji_tag({name, url}) do
     %{
-      "icon" => %{"url" => url, "type" => "Image"},
+      "icon" => %{"url" => "#{URI.encode(url)}", "type" => "Image"},
       "name" => ":" <> name <> ":",
       "type" => "Emoji",
       "updated" => "1970-01-01T00:00:00Z",