Incorrect HTML Code rendered in list_editable enabled changelists
|Reported by:||Owned by:||Karen Tracey|
|Severity:||Keywords:||list_editable, admin_list.py, items_for_result, opera|
|Has patch:||yes||Needs documentation:||no|
|Needs tests:||no||Patch needs improvement:||no|
items_for_result in django.contrib.admin.templatetags.admin_list.py appends the hidden field for the form-id to the output which, in the case of the multiple forms in the change form, results in an input field right after the last field which has been rendered:
<td><img src="http://127.0.0.1:8199/media/img/admin/icon-no.gif" alt="False" /></td><td><img src="http://127.0.0.1:8199/media/img/admin/icon-no.gif" alt="0" /></td><input type="hidden" name="form-1-id" value="3287" id="id_form-1-id" /></tr>
As far as I know that type of HTML element isn't allowed between the closing tags of TD and TR. This results in corrupted output when using Opera to view such a change list - it renders an empty blue line on top of the change list for every item in the change list.
A quick fix would be to let items_for_result "inject" the hidden input right after the last field itself, inside its TD, not outside.
Change History (9)
comment:4 Changed 7 years ago by
|Owner:||changed from Mark Lavin to Karen Tracey|
|Status:||assigned → new|
comment:5 Changed 7 years ago by
|Component:||Contrib apps → django.contrib.admin|
|Triage Stage:||Unreviewed → Accepted|