Remove spaces from the domain search
This commit is contained in:
parent
7319b41e34
commit
040347b248
2 changed files with 13 additions and 1 deletions
|
|
@ -44,7 +44,7 @@ defmodule Pleroma.User.Search do
|
|||
query_string = String.trim_leading(query_string, "@")
|
||||
|
||||
with [name, domain] <- String.split(query_string, "@"),
|
||||
formatted_domain <- String.replace(domain, ~r/[!-\-|@|[-`|{-~|\/|:]+/, "") do
|
||||
formatted_domain <- String.replace(domain, ~r/[!-\-|@|[-`|{-~|\/|:|\s]+/, "") do
|
||||
name <> "@" <> to_string(:idna.encode(formatted_domain))
|
||||
else
|
||||
_ -> query_string
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue