forked from mirrors/bookwyrm
Html validation fix for user admin view
This commit is contained in:
parent
ada3e1d4d6
commit
5b3ff8469d
2 changed files with 4 additions and 7 deletions
|
@ -4,10 +4,7 @@
|
|||
{% block title %}{{ user.username }}{% endblock %}
|
||||
{% block header %}
|
||||
{{ user.username }}
|
||||
<p class="help has-text-weight-normal">
|
||||
<a href="{% url 'settings-users' %}">{% trans "Back to users" %}</a>
|
||||
</p>
|
||||
|
||||
<a class="help has-text-weight-normal" href="{% url 'settings-users' %}">{% trans "Back to users" %}</a>
|
||||
{% endblock %}
|
||||
|
||||
{% block panel %}
|
||||
|
|
|
@ -37,7 +37,7 @@ class UserAdminViews(TestCase):
|
|||
result = view(request)
|
||||
self.assertIsInstance(result, TemplateResponse)
|
||||
html = result.render()
|
||||
_, errors = tidy_document(html.content)
|
||||
_, errors = tidy_document(html.content, options={"drop-empty-elements": False})
|
||||
if errors:
|
||||
raise Exception(errors)
|
||||
self.assertEqual(result.status_code, 200)
|
||||
|
@ -53,7 +53,7 @@ class UserAdminViews(TestCase):
|
|||
|
||||
self.assertIsInstance(result, TemplateResponse)
|
||||
html = result.render()
|
||||
_, errors = tidy_document(html.content)
|
||||
_, errors = tidy_document(html.content, options={"drop-empty-elements": False})
|
||||
if errors:
|
||||
raise Exception(errors)
|
||||
self.assertEqual(result.status_code, 200)
|
||||
|
@ -78,7 +78,7 @@ class UserAdminViews(TestCase):
|
|||
|
||||
self.assertIsInstance(result, TemplateResponse)
|
||||
html = result.render()
|
||||
_, errors = tidy_document(html.content)
|
||||
_, errors = tidy_document(html.content, options={"drop-empty-elements": False})
|
||||
if errors:
|
||||
raise Exception(errors)
|
||||
|
||||
|
|
Loading…
Reference in a new issue