1
0
Fork 1
mirror of https://akkoma.dev/AkkomaGang/akkoma.git synced 2024-12-25 04:53:06 +00:00

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 @@ def build_tags(object_tags) when is_list(object_tags) do
object_tags = for tag when is_binary(tag) <- object_tags, do: tag
Enum.reduce(object_tags, [], fn tag, tags ->
tags ++ [%{name: tag, url: "/tag/#{tag}"}]
tags ++ [%{name: tag, url: "/tag/#{URI.encode(tag)}"}]
end)
end