logo

pleroma

My custom branche(s) on git.pleroma.social/pleroma/pleroma git clone https://hacktivis.me/git/pleroma.git
commit: f2ed05191ce0c63d3149f35b44cffc26f1061a39
parent 0e89a9ad15bd86731b3babfced990d1d8ec7db4c
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:"})