From f2ed05191ce0c63d3149f35b44cffc26f1061a39 Mon Sep 17 00:00:00 2001 From: tusooa Date: Fri, 6 Jan 2023 14:11:56 -0500 Subject: [PATCH] Test double dot link --- test/pleroma/web/common_api_test.exs | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/test/pleroma/web/common_api_test.exs b/test/pleroma/web/common_api_test.exs index 2876d4093..5c9103e9f 100644 --- a/test/pleroma/web/common_api_test.exs +++ b/test/pleroma/web/common_api_test.exs @@ -527,6 +527,16 @@ test "zwnj is treated as word character" do assert Object.tags(object) == ["ساٴين‌س"] end + test "double dot in link is allowed" do + user = insert(:user) + text = "https://example.to/something..mp3" + {:ok, activity} = CommonAPI.post(user, %{status: text}) + + object = Object.normalize(activity, fetch: false) + + assert object.data["content"] == "#{text}" + end + test "it adds emoji in the object" do user = insert(:user) {:ok, activity} = CommonAPI.post(user, %{status: ":firefox:"})