summaryrefslogtreecommitdiff
path: root/test/html_test.exs
diff options
context:
space:
mode:
authorMaksim Pechnikov <parallel588@gmail.com>2019-12-01 16:18:16 +0300
committerMaksim Pechnikov <parallel588@gmail.com>2019-12-01 16:18:16 +0300
commit88f7cf51d43181b27db5ff1807d3e706fa336bac (patch)
tree3c3f8ba3b7685290e26c3582eeba7ba55ca1d10b /test/html_test.exs
parent708fd234bdff5423ca6d8003232eca0df231bbc2 (diff)
parent0d24ab04c5ea779432b4ea174a1d470dac87315d (diff)
downloadpleroma-88f7cf51d43181b27db5ff1807d3e706fa336bac.tar.gz
pleroma-88f7cf51d43181b27db5ff1807d3e706fa336bac.zip
Merge branch 'develop' into issue/1411
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