diff options
author | lain <lain@soykaf.club> | 2020-07-06 12:07:56 +0200 |
---|---|---|
committer | lain <lain@soykaf.club> | 2020-07-06 12:07:56 +0200 |
commit | ed4f9f6a29d8cf2dd31e41bae7e63aaa15bc9548 (patch) | |
tree | 82c5e8b4a40495485533b9c95668cef39ce909d2 /test/html_test.exs | |
parent | a5bbfa21a1fabe97bfff1cc80348d2944319f3ad (diff) | |
parent | 69f0b286f7b3e0518ac7ae54dfb06539dc179698 (diff) | |
download | pleroma-ed4f9f6a29d8cf2dd31e41bae7e63aaa15bc9548.tar.gz pleroma-ed4f9f6a29d8cf2dd31e41bae7e63aaa15bc9548.zip |
Merge branch 'develop' of git.pleroma.social:pleroma/pleroma into 1507-static-fe-prioritize-json
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 |