From 09ed8f4f8a7573a953c60def1e4506a140b49221 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:"})