X-Git-Url: https://git.squeep.com/?a=blobdiff_plain;ds=inline;f=test%2Fhtml_test.exs;h=306ad3b3b061a52738ae8ac6350ba0381c36affa;hb=6f67aed3acf557bb1e37415af82acd97e46c9ac4;hp=64513980b0bb48fb57ec375646d968cef70a86b0;hpb=52b1b0e45dbc0835cc81530cae0e85cb1264c905;p=akkoma
diff --git a/test/html_test.exs b/test/html_test.exs
index 64513980b..306ad3b3b 100644
--- a/test/html_test.exs
+++ b/test/html_test.exs
@@ -1,5 +1,5 @@
# Pleroma: A lightweight social networking server
-# Copyright © 2017-2018 Pleroma Authors
+# Copyright © 2017-2019 Pleroma Authors
# SPDX-License-Identifier: AGPL-3.0-only
defmodule Pleroma.HTMLTest do
@@ -212,5 +212,21 @@ defmodule Pleroma.HTMLTest do
assert url == "https://www.pixiv.net/member_illust.php?mode=medium&illust_id=72255140"
end
+
+ test "skips microformats hashtags" do
+ user = insert(:user)
+
+ {:ok, activity} =
+ CommonAPI.post(user, %{
+ "status" =>
+ "#cofe https://www.pixiv.net/member_illust.php?mode=medium&illust_id=72255140",
+ "content_type" => "text/html"
+ })
+
+ object = Object.normalize(activity)
+ {:ok, url} = HTML.extract_first_external_url(object, object.data["content"])
+
+ assert url == "https://www.pixiv.net/member_illust.php?mode=medium&illust_id=72255140"
+ end
end
end