X-Git-Url: http://git.squeep.com/?a=blobdiff_plain;f=test%2Fhtml_test.exs;h=b8906c46a5ef6f0674f66493a8643d0a39680f30;hb=d1549a6375a1c5a4a4915241df266665b7d99360;hp=64513980b0bb48fb57ec375646d968cef70a86b0;hpb=135c19676994defd6de729a497af5fb1f9c7b0ad;p=akkoma diff --git a/test/html_test.exs b/test/html_test.exs index 64513980b..b8906c46a 100644 --- a/test/html_test.exs +++ b/test/html_test.exs @@ -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