diff options
author | Maksim Pechnikov <parallel588@gmail.com> | 2019-12-01 16:18:16 +0300 |
---|---|---|
committer | Maksim Pechnikov <parallel588@gmail.com> | 2019-12-01 16:18:16 +0300 |
commit | 88f7cf51d43181b27db5ff1807d3e706fa336bac (patch) | |
tree | 3c3f8ba3b7685290e26c3582eeba7ba55ca1d10b /test/html_test.exs | |
parent | 708fd234bdff5423ca6d8003232eca0df231bbc2 (diff) | |
parent | 0d24ab04c5ea779432b4ea174a1d470dac87315d (diff) | |
download | pleroma-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.exs | 11 |
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 |