aboutsummaryrefslogtreecommitdiff
path: root/test/html_test.exs
diff options
context:
space:
mode:
authorIvan Tashkinov <ivantashkinov@gmail.com>2019-12-04 18:56:31 +0300
committerIvan Tashkinov <ivantashkinov@gmail.com>2019-12-04 18:56:31 +0300
commit30caf3e51e32830153e693727b3765e8817171a3 (patch)
treeb752dd12604afa8be2bc7c753a64a5725bc2ebbc /test/html_test.exs
parent52cc7de82cf3aa637d599edc357909be8c9366eb (diff)
parent228bf4d214abe3bb62c52128d3bc145e396b174d (diff)
downloadpleroma-30caf3e51e32830153e693727b3765e8817171a3.tar.gz
Merge remote-tracking branch 'remotes/upstream/develop' into 1335-user-api-id-fields-relations
# 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