diff options
author | Ivan Tashkinov <ivantashkinov@gmail.com> | 2020-05-30 10:29:08 +0300 |
---|---|---|
committer | Ivan Tashkinov <ivantashkinov@gmail.com> | 2020-05-30 10:29:08 +0300 |
commit | 24f40b8a26f95ee7f50b6023176d361660ceb35c (patch) | |
tree | 138bc345dd6ff65a8b91bec501dc8f32f9f239ea /lib/pleroma | |
parent | 78c80a261a5450a248c24f6d7d39bc59aed1ff88 (diff) | |
download | pleroma-24f40b8a26f95ee7f50b6023176d361660ceb35c.tar.gz |
[#1794] Fixed search query splitting regex to deal with Unicode. Adjusted a test.
Diffstat (limited to 'lib/pleroma')
-rw-r--r-- | lib/pleroma/web/mastodon_api/controllers/search_controller.ex | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/pleroma/web/mastodon_api/controllers/search_controller.ex b/lib/pleroma/web/mastodon_api/controllers/search_controller.ex index 23fe378a6..8840fc19c 100644 --- a/lib/pleroma/web/mastodon_api/controllers/search_controller.ex +++ b/lib/pleroma/web/mastodon_api/controllers/search_controller.ex @@ -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) |