summaryrefslogtreecommitdiff
path: root/test/html_test.exs
diff options
context:
space:
mode:
authorMark Felder <feld@FreeBSD.org>2020-07-13 13:32:21 -0500
committerMark Felder <feld@FreeBSD.org>2020-07-13 13:32:21 -0500
commit80c21100db306ce45856bbdb97d3439676babeeb (patch)
treed143f523da262df5176220fbe6dc0b6370c91ebc /test/html_test.exs
parentce85db41a30d95555bbd44d8931c4a3a357938d8 (diff)
parent5d215fd81f529b639db9096ca71d4e7f0a6ed386 (diff)
downloadpleroma-80c21100db306ce45856bbdb97d3439676babeeb.tar.gz
pleroma-80c21100db306ce45856bbdb97d3439676babeeb.zip
Merge branch 'develop' into refactor/notification_settings
Diffstat (limited to 'test/html_test.exs')
-rw-r--r--test/html_test.exs14
1 files changed, 14 insertions, 0 deletions
diff --git a/test/html_test.exs b/test/html_test.exs
index 0a4b4ebbc..f8907c8b4 100644
--- a/test/html_test.exs
+++ b/test/html_test.exs
@@ -237,5 +237,19 @@ defmodule Pleroma.HTMLTest do
assert {:ok, nil} = HTML.extract_first_external_url(object, object.data["content"])
end
+
+ test "skips attachment links" do
+ user = insert(:user)
+
+ {:ok, activity} =
+ CommonAPI.post(user, %{
+ status:
+ "<a href=\"https://pleroma.gov/media/d24caa3a498e21e0298377a9ca0149a4f4f8b767178aacf837542282e2d94fb1.png?name=image.png\" class=\"attachment\">image.png</a>"
+ })
+
+ object = Object.normalize(activity)
+
+ assert {:ok, nil} = HTML.extract_first_external_url(object, object.data["content"])
+ end
end
end