logo

pleroma

My custom branche(s) on git.pleroma.social/pleroma/pleroma git clone https://hacktivis.me/git/pleroma.git
commit: 09ed8f4f8a7573a953c60def1e4506a140b49221
parent 686fef59db4c2489b8de1d6aa7f9f06066ff06bc
Author: tusooa <tusooa@kazv.moe>
Date:   Fri,  6 Jan 2023 14:11:56 -0500

Test double dot link

Diffstat:

Mtest/pleroma/web/common_api_test.exs10++++++++++
1 file changed, 10 insertions(+), 0 deletions(-)

diff --git a/test/pleroma/web/common_api_test.exs b/test/pleroma/web/common_api_test.exs @@ -527,6 +527,16 @@ defmodule Pleroma.Web.CommonAPITest 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"] == "<a href=\"#{text}\" rel=\"ugc\">#{text}</a>" + end + test "it adds emoji in the object" do user = insert(:user) {:ok, activity} = CommonAPI.post(user, %{status: ":firefox:"})