X-Git-Url: http://git.squeep.com/?a=blobdiff_plain;f=test%2Fhtml_test.exs;h=c918dbe203156a9bac79d251b94d9ab5b95c9ce7;hb=8cfaab8f04cae6fcc20a37cdb463ee0c93b71217;hp=f0869534cdced6047d9ba72be9f1b27c3a00961b;hpb=3c0abfca53751624ebd6ea7174ee880d9e7b29e7;p=akkoma diff --git a/test/html_test.exs b/test/html_test.exs index f0869534c..c918dbe20 100644 --- a/test/html_test.exs +++ b/test/html_test.exs @@ -228,5 +228,16 @@ defmodule Pleroma.HTMLTest do assert url == "https://www.pixiv.net/member_illust.php?mode=medium&illust_id=72255140" end + + test "does not crash when there is an HTML entity in a link" do + user = insert(:user) + + {:ok, activity} = + CommonAPI.post(user, %{"status" => "\"http://cofe.com/?boomer=ok&foo=bar\""}) + + object = Object.normalize(activity) + + assert {:ok, nil} = HTML.extract_first_external_url(object, object.data["content"]) + end end end