logo

pleroma

My custom branche(s) on git.pleroma.social/pleroma/pleroma git clone https://anongit.hacktivis.me/git/pleroma.git/
commit: c31454fac1cf15916a406f9e7cc5c3deaf7514a5
parent f290b159875b68a4ee03ac9f9ced80242ee7085a
Author: Phantasm <phantasm@centrum.cz>
Date:   Mon, 20 Oct 2025 22:44:42 +0200

Fix unicode URL encoding test

Diffstat:

Mtest/pleroma/web/media_proxy_test.exs6++++--
1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/test/pleroma/web/media_proxy_test.exs b/test/pleroma/web/media_proxy_test.exs @@ -182,11 +182,13 @@ defmodule Pleroma.Web.MediaProxyTest do assert decode_result(encoded) == url end - test "preserve unicode characters" do + # Improperly encoded URLs should not happen even when input was wrong. + test "does not preserve unicode characters" do url = "https://ko.wikipedia.org/wiki/위키백과:대문" + encoded_url = "https://ko.wikipedia.org/wiki/%EC%9C%84%ED%82%A4%EB%B0%B1%EA%B3%BC:%EB%8C%80%EB%AC%B8" encoded = MediaProxy.url(url) - assert decode_result(encoded) == url + assert decode_result(encoded) == encoded_url end end