Opened 10 years ago

Closed 6 years ago

Last modified 6 years ago

#2283 closed defect (fixed)

[patch] comment form templates don't validate as XHTML strict

Reported by: fonso Owned by: Adrian Holovaty
Component: contrib.comments Version:
Severity: minor Keywords:
Cc: Triage Stage: Accepted
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:

Description

The comment form templates in contrib/comments/templates/comments don't validate as XHTML 1.0 Strict (don't know if they'd validate in Transitional) due to the lack of a block-level container for the hidden input fields.

Attachments (2)

valid_comment_form_templates.diff (1.8 KB) - added by fonso 10 years ago.
2283.diff (4.7 KB) - added by Thejaswi Puthraya 8 years ago.
git-patch against the latest checkout

Download all attachments as: .zip

Change History (15)

Changed 10 years ago by fonso

comment:1 Changed 10 years ago by Adrian Holovaty

Resolution: fixed
Status: newclosed

(In [3283]) Fixed #2283 -- Fixed XHTML-strict validation error in comment templates

comment:2 Changed 8 years ago by hjoreteg

Resolution: fixed
Status: closedreopened

This seems to be a problem again. The hidden fields produced by the template "form.html" in django.contrib.comments.templates do not validate with XHTML Strict because they are inline elements without a block-level container.

I'm using version 1.1.0 alpha Django

comment:3 Changed 8 years ago by call_of_duty_6

The hidden fields produced by the template *files "form.html" in django.contrib.comments.templates do not validate with XHTML Strict because they are inline elements without a block-level container.

comment:4 Changed 8 years ago by Jacob

Triage Stage: UnreviewedAccepted

comment:5 Changed 8 years ago by Thejaswi Puthraya

Component: Contrib appsdjango.contrib.comments

Wow, can't believe this bug existed in both versions and took so long to fix.

Changed 8 years ago by Thejaswi Puthraya

Attachment: 2283.diff added

git-patch against the latest checkout

comment:6 Changed 8 years ago by Thejaswi Puthraya

The admin and forms use XHTML and some tags in the comments (like IMG and Meta) were usign XHTML,
so I thought why not convert everything to XHTML for uniformity.

comment:7 Changed 7 years ago by Adam Nelson

Triage Stage: AcceptedDesign decision needed

comment:8 Changed 6 years ago by Malcolm Tredinnick

Triage Stage: Design decision neededAccepted

No idea why this is DDN. Forms should be XHTML in django at the moment.

comment:9 Changed 6 years ago by Luke Plant

We are currently standardised on XHTML for all templates/forms, but not necessarily XHTML Strict - some existing templates use Transitional, and this is less likely to cause problems with content. So I will modify this patch to use XHTML Transitional doctypes. Also, I'll use div instead of p for hidden element, since a plain 'div' is less likely than 'p' to have a margin set that might cause unsightly gaps.

I'll commit shortly.

comment:10 Changed 6 years ago by Luke Plant

Resolution: fixed
Status: reopenedclosed

(In [13855]) Fixed #2283 (again) - comment form templates don't validate as XHTML

Thanks to hjoreteg/thejaswi_puthraya for the report and patch.

comment:11 Changed 6 years ago by Luke Plant

(In [13856]) [1.2.X] Fixed #2283 (again) - comment form templates don't validate as XHTML

Thanks to hjoreteg/thejaswi_puthraya for the report and patch.

Backport of [13855] from trunk

comment:13 Changed 6 years ago by Luke Plant

Thanks for the catch jezdez, will fix shortly.

Note: See TracTickets for help on using tickets.
Back to Top