logo

pleroma

My custom branche(s) on git.pleroma.social/pleroma/pleroma
commit: 46ae62d159ca0a330d18a2e1f775a5ed9eaebc42
parent: fb7332aec7e5db781ffddf01e1510ffbfc9eac11
Author: Haelwenn <contact+git.pleroma.social@hacktivis.me>
Date:   Wed, 11 Sep 2019 17:47:19 +0000

Merge branch 'patch-5' into 'develop'

Mastodon API: URI encode hashtag name in generated URLs

See merge request pleroma/pleroma!1642

Diffstat:

Mlib/pleroma/web/mastodon_api/views/status_view.ex2+-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/pleroma/web/mastodon_api/views/status_view.ex b/lib/pleroma/web/mastodon_api/views/status_view.ex @@ -497,7 +497,7 @@ defmodule Pleroma.Web.MastodonAPI.StatusView 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