'Django form field help_text rendering problem

I have the following template:

{% if field.help_text %}
    <p class="helptext">
        { field.help_text|safe }}
    </p>
{% endif %}

The problem is: help_text is being rendered outside the p tag for a password field.

<p class="helptext"> </p>
<ul>
   <li>...</li> 
   <li>...</li>
</ul>

Am I doing something wrong? Am I missing something? How can I apply "helptext" class to the help_text provided by the passwordfield?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source