aboutsummaryrefslogtreecommitdiff
path: root/test/html_test.exs
diff options
context:
space:
mode:
authorSadposter <hannah+pleroma@coffee-and-dreams.uk>2019-12-10 16:54:25 +0000
committerSadposter <hannah+pleroma@coffee-and-dreams.uk>2019-12-10 16:54:25 +0000
commit8cfaab8f04cae6fcc20a37cdb463ee0c93b71217 (patch)
tree5ea3e43a73796f264508b583051f6f2143071f00 /test/html_test.exs
parent5abee19b63aa1577f8895b48ae69f0a51edb4dc3 (diff)
parentaac0187ec13078d2756db1671e644d6eb9c0947b (diff)
downloadpleroma-8cfaab8f04cae6fcc20a37cdb463ee0c93b71217.tar.gz
Merge branch 'develop' into 'domain-block-precedence'
# Conflicts: # lib/pleroma/user.ex
Diffstat (limited to 'test/html_test.exs')
-rw-r--r--test/html_test.exs11
1 files changed, 11 insertions, 0 deletions
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