Fix character escaping test for Pleroma.Upload

This commit is contained in:
Phantasm 2025-08-29 15:04:02 +02:00
commit 80db6f1328
No known key found for this signature in database
GPG key ID: 2669E588BCC634C8
4 changed files with 40 additions and 20 deletions

View file

@ -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