Fix character escaping test for Pleroma.Upload
This commit is contained in:
parent
0a8423fdf7
commit
80db6f1328
4 changed files with 40 additions and 20 deletions
|
|
@ -174,10 +174,14 @@ defmodule Pleroma.HTTP do
|
|||
|
||||
path
|
||||
|> URI.encode(fn byte ->
|
||||
URI.char_unreserved?(byte) || Enum.any?(
|
||||
Pleroma.Constants.uri_path_allowed_reserved_chars, fn char ->
|
||||
char == byte end)
|
||||
end)
|
||||
URI.char_unreserved?(byte) ||
|
||||
Enum.any?(
|
||||
Pleroma.Constants.uri_path_allowed_reserved_chars(),
|
||||
fn char ->
|
||||
char == byte
|
||||
end
|
||||
)
|
||||
end)
|
||||
end
|
||||
|
||||
defp encode_query(nil), do: nil
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue