[#1794] Fixes URI query handling for hashtags extraction in search.

This commit is contained in:
Ivan Tashkinov 2020-06-12 14:25:41 +03:00
commit 2188097066
2 changed files with 30 additions and 0 deletions

View file

@ -152,6 +152,7 @@ defmodule Pleroma.Web.MastodonAPI.SearchController do
defp preprocess_uri_query(query) do
if query =~ ~r/https?:\/\// do
query
|> String.trim_trailing("/")
|> URI.parse()
|> Map.get(:path)
|> String.split("/")