﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
32354	HTML in verbose_name	Serl	nobody	"Hello,

I'm having some issues with the `verbose_name` of some of the fields in my models.

In particular, I'd like to put some HTML in there. Here's an example:

{{{#!python
short_ohohoh = models.CharField(
    mark_safe(""<abbr title='This is way longer'>Short</abbr> ohohoh""),
    max_length=100,
)
}}}

The problem is: even if I `mark_safe`, the verbose_name is escaped when I try to get it in my templates with: `{{ form.short_ohohoh.label }}` or `{{ form.short_ohohoh.label_tag }}`.

----

I dug in Django's code, and I found out that the verbose_name passes through a `capfirst` here in `formfield`: https://github.com/django/django/blob/75182a800a621b7a5b2c0a1f39a56e753b9a58ca/django/db/models/fields/__init__.py#L916.

That way, my SafeString is transformed back to str, I guess. I tried to remove the `capfirst` and assigning directly `verbose_name` and my HTML is preserved (but fields without `verbose_name` are, obviously, lowercase).

As a workaround, in my templates, I can `mark_safe` it again, but sadly the Django admin displays my fields incorrectly.

----

So yeah, for starters: is there a better way to deal with acronymns in my models?
Then, I would move the `capfirst` directly to `set_attributes_from_name` in https://github.com/django/django/blob/75182a800a621b7a5b2c0a1f39a56e753b9a58ca/django/db/models/fields/__init__.py#L772. Is there a reason why it is not already there?

Thanks!
"	Bug	closed	Forms	3.1	Normal	invalid			Unreviewed	0	0	0	0	0	0
