[#1794] Fixed search query splitting regex to deal with Unicode. Adjusted a test.
This commit is contained in:
parent
78c80a261a
commit
24f40b8a26
2 changed files with 5 additions and 1 deletions
|
|
@ -124,7 +124,7 @@ defmodule Pleroma.Web.MastodonAPI.SearchController do
|
|||
defp prepare_tags(query, add_joined_tag \\ true) do
|
||||
tags =
|
||||
query
|
||||
|> String.split(~r/[^#\w]+/, trim: true)
|
||||
|> String.split(~r/[^#\w]+/u, trim: true)
|
||||
|> Enum.uniq_by(&String.downcase/1)
|
||||
|
||||
explicit_tags = Enum.filter(tags, fn tag -> String.starts_with?(tag, "#") end)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue