﻿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
22241	Extra line break tags in contrib/admin/templates/admin/includes/fieldset.html break display of computed fields	atodorov@…	nobody	"This is a reference to #19226 which is not properly fixed. 

See:
https://code.djangoproject.com/ticket/19226#comment:14

<quote>
Hi guys,
this fix is breaking up display for me. I'm using computed read-only fields which display rich HTML into the model change form as a way to augment the administration experience which works really well for me.

Adding multiple line break tags breaks my display (this only happens because the templates used to render the fields have new lines in them). Now I have to go all-over my code and strip new lines before returning the field value.

It would be nice if the linebreaks filter skipped \n, <br/> replacement on safe strings. 
</quote>

Attached is code to reproduce. Run it on Django 1.4.X and then on 1.5.X or 1.6.X to see the difference. 

In the add/change form for Advisory objects there are several divs which should appear on the same line but with the added line breaks they get messed up. 

Workaround is to remove all newlines before rendering this field value. 


Initially the bug was reported against text area type of fields so either fix it only for them or allow linebreaksbr filter to skip safe strings. 
"	Bug	closed	contrib.admin	1.6	Normal	fixed		atodorov@…	Accepted	1	0	0	0	0	0
