Opened 5 years ago

Last modified 5 years ago

#31189 closed Cleanup/optimization

django.contrib.auth: Password field help text generates invalid html — at Initial Version

Reported by: Marc Nieper-Wißkirchen Owned by: nobody
Component: contrib.auth Version: 3.0
Severity: Normal Keywords:
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

The help text for the password field of, say, the UserCreationForm, is generated here: https://github.com/django/django/blob/master/django/contrib/auth/password_validation.py#L78 and is an html list. The form methods, as_table' and as_p', however, wrap the help text into a span tag. In the resulting rendered HTML, there will thus be a ul tag inside a span tag, which is invalid html.

To solve this problem, the span tag needs to be a div.

Change History (0)

Note: See TracTickets for help on using tickets.
Back to Top