From: Haelwenn Date: Wed, 11 Sep 2019 17:47:19 +0000 (+0000) Subject: Merge branch 'patch-5' into 'develop' X-Git-Url: http://git.squeep.com/?a=commitdiff_plain;h=46ae62d159ca0a330d18a2e1f775a5ed9eaebc42;hp=fb7332aec7e5db781ffddf01e1510ffbfc9eac11;p=akkoma Merge branch 'patch-5' into 'develop' Mastodon API: URI encode hashtag name in generated URLs See merge request pleroma/pleroma!1642 --- diff --git a/lib/pleroma/web/mastodon_api/views/status_view.ex b/lib/pleroma/web/mastodon_api/views/status_view.ex index b6a3431f9..ef796cddd 100644 --- 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