diff options
author | lain <lain@soykaf.club> | 2020-06-30 11:40:34 +0200 |
---|---|---|
committer | lain <lain@soykaf.club> | 2020-06-30 11:40:34 +0200 |
commit | 0176b7bca2e64f82228129024ac059e3bee00675 (patch) | |
tree | c7e092a07c8ec5d672142dc56a72fae8981422f3 /test/html_test.exs | |
parent | 8630a6c7f52a68ab32025b1c80a6398599908c68 (diff) | |
parent | 2382a2a1511e1042d960946aacfde7a49fac9dd0 (diff) | |
download | pleroma-0176b7bca2e64f82228129024ac059e3bee00675.tar.gz pleroma-0176b7bca2e64f82228129024ac059e3bee00675.zip |
Merge branch 'preload-fixups-2' into preloadfixups
Diffstat (limited to 'test/html_test.exs')
-rw-r--r-- | test/html_test.exs | 14 |
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 |