mirror of
https://akkoma.dev/AkkomaGang/akkoma.git
synced 2024-11-10 19:29:11 +00:00
Mastodon API: URI encode hashtag name in generated URLs
Otherwise hashtags with word characters other than those allowed in URLs (e.g. Japanese characters) produce hashtag URLs that are invalid.
This commit is contained in:
parent
c45013df8e
commit
e5c6bf3673
1 changed files with 1 additions and 1 deletions
|
@ -499,7 +499,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
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue