forked from AkkomaGang/akkoma
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 @@ 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
|
||||
|
||||
|
|
Loading…
Reference in a new issue