'When displaying a bound form (typically due to invalid input), the form
should not overquote JSONField inputs.'

def test_redisplay_wrong_input(self):

    class JsonForm(Form, ):
        name = CharField(max_length=2)
        jfield = forms.JSONField()
    form = JsonForm({'name': 'xyz', 'jfield': '["foo"]'})
    self.assertIn('[&quot;foo&quot;]</textarea>', form.as_p())
    form = JsonForm({'name': 'xy', 'jfield': '{"foo"}'})
    self.assertEqual(form.as_p().count(escape('{"foo"}')), 2)
