mastodon API: do not sanitize html in non-html fields

This commit is contained in:
rinpatch 2020-01-30 19:47:57 +03:00
commit 983a87175e
6 changed files with 10 additions and 25 deletions

View file

@ -368,10 +368,10 @@ defmodule Pleroma.Web.MastodonAPI.AccountViewTest do
assert result.pleroma[:settings_store] == nil
end
test "sanitizes display names" do
test "doesn't sanitize display names" do
user = insert(:user, name: "<marquee> username </marquee>")
result = AccountView.render("show.json", %{user: user})
refute result.display_name == "<marquee> username </marquee>"
assert result.display_name == "<marquee> username </marquee>"
end
test "never display nil user follow counts" do