From 686fef59db4c2489b8de1d6aa7f9f06066ff06bc Mon Sep 17 00:00:00 2001 From: tusooa Date: Sat, 5 Nov 2022 23:36:10 -0400 Subject: [PATCH] Test that zwnj is treated as word char in hashtags --- test/pleroma/web/common_api_test.exs | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/test/pleroma/web/common_api_test.exs b/test/pleroma/web/common_api_test.exs index 44355c26d..2876d4093 100644 --- a/test/pleroma/web/common_api_test.exs +++ b/test/pleroma/web/common_api_test.exs @@ -518,6 +518,15 @@ test "it de-duplicates tags" do assert Object.tags(object) == ["2hu"] end + test "zwnj is treated as word character" do + user = insert(:user) + {:ok, activity} = CommonAPI.post(user, %{status: "#ساٴين‌س"}) + + object = Object.normalize(activity, fetch: false) + + assert Object.tags(object) == ["ساٴين‌س"] + end + test "it adds emoji in the object" do user = insert(:user) {:ok, activity} = CommonAPI.post(user, %{status: ":firefox:"})