summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorHaelwenn <contact+git.pleroma.social@hacktivis.me>2023-05-17 15:28:32 +0000
committerHaelwenn <contact+git.pleroma.social@hacktivis.me>2023-05-17 15:28:32 +0000
commit143676f58c8a5c0805af73ba7a86bdcc4dc85b13 (patch)
treedb0983c00eab0ec95f112fc2b93c256931179f5e /test
parent248f914e6eb33bc22089f00175d0bc0da9d27eb0 (diff)
parent163e82bab1cc12ad323bfc9c1fcada11fa3b223a (diff)
downloadpleroma-143676f58c8a5c0805af73ba7a86bdcc4dc85b13.tar.gz
pleroma-143676f58c8a5c0805af73ba7a86bdcc4dc85b13.zip
Merge branch 'tusooa/allow-lang' into 'develop'
Allow lang attribute See merge request pleroma/pleroma!3882
Diffstat (limited to 'test')
-rw-r--r--test/pleroma/web/common_api_test.exs11
1 files changed, 11 insertions, 0 deletions
diff --git a/test/pleroma/web/common_api_test.exs b/test/pleroma/web/common_api_test.exs
index 5c9103e9f..968d826a2 100644
--- a/test/pleroma/web/common_api_test.exs
+++ b/test/pleroma/web/common_api_test.exs
@@ -527,6 +527,17 @@ defmodule Pleroma.Web.CommonAPITest do
assert Object.tags(object) == ["ساٴين‌س"]
end
+ test "allows lang attribute" do
+ user = insert(:user)
+ text = ~s{<span lang="en">something</span><p lang="diaetuitech_rpyhpgc">random</p>}
+
+ {:ok, activity} = CommonAPI.post(user, %{status: text, content_type: "text/html"})
+
+ object = Object.normalize(activity, fetch: false)
+
+ assert object.data["content"] == text
+ end
+
test "double dot in link is allowed" do
user = insert(:user)
text = "https://example.to/something..mp3"