diff options
author | Haelwenn <contact+git.pleroma.social@hacktivis.me> | 2019-09-11 17:47:19 +0000 |
---|---|---|
committer | Haelwenn <contact+git.pleroma.social@hacktivis.me> | 2019-09-11 17:47:19 +0000 |
commit | 46ae62d159ca0a330d18a2e1f775a5ed9eaebc42 (patch) | |
tree | 1b130bbe4ce89840958a43fdcd25126a4cbb1a73 | |
parent | fb7332aec7e5db781ffddf01e1510ffbfc9eac11 (diff) | |
parent | e5c6bf3673a8361d1417eba1ccc44edec7658ac4 (diff) | |
download | pleroma-46ae62d159ca0a330d18a2e1f775a5ed9eaebc42.tar.gz pleroma-46ae62d159ca0a330d18a2e1f775a5ed9eaebc42.zip |
Merge branch 'patch-5' into 'develop'
Mastodon API: URI encode hashtag name in generated URLs
See merge request pleroma/pleroma!1642
-rw-r--r-- | lib/pleroma/web/mastodon_api/views/status_view.ex | 2 |
1 files changed, 1 insertions, 1 deletions
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 |