Merge branch 'patch-5' into 'develop'

Mastodon API: URI encode hashtag name in generated URLs

See merge request pleroma/pleroma!1642
This commit is contained in:
Haelwenn 2019-09-11 17:47:19 +00:00
commit 46ae62d159

View File

@ -497,7 +497,7 @@ defmodule Pleroma.Web.MastodonAPI.StatusView do
object_tags = for tag when is_binary(tag) <- object_tags, do: tag object_tags = for tag when is_binary(tag) <- object_tags, do: tag
Enum.reduce(object_tags, [], fn tag, tags -> Enum.reduce(object_tags, [], fn tag, tags ->
tags ++ [%{name: tag, url: "/tag/#{tag}"}] tags ++ [%{name: tag, url: "/tag/#{URI.encode(tag)}"}]
end) end)
end end