﻿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
27386	Callable field is wrapped inside <p>...</p>	Jacob Rief	nobody	"(Pseudo)-Fields in classes inheriting from ``django.contrib.admin.ModelsAdmin`` which are callables, must be listed in ``readonly_fields``. This implies that in ``admin/includes/fieldset.html`` (line 17) and ``admin/edit_inline/tabular.html`` (line 55) the content of this field is wrapped inside a paragraph ``<p>{{ field.contents }}</p>``.

However, a ``<p>...</p>`` is not suitable to accept every kind of HTML element. Therefore when using a ""callable"" field, which renders it's content in HTML, one might get a surprising result.

Since the author of a callable field may wrap it's content into whatever (s)he likes, there should be a way to avoid these wrapping paragraphs.

My proposal is to check if ``field.contents`` is safe text, and if so then leave it as-is, or otherwise wrap it  into ``<p>..</p>`` as we do it right now."	Cleanup/optimization	new	contrib.admin	dev	Normal		field		Unreviewed	0	0	0	0	0	0
