Opened 9 years ago

Closed 5 years ago

Last modified 5 years ago

#2283 closed defect (fixed)

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

Reported by: fonso Owned by: adrian
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 9 years ago.
2283.diff (4.7 KB) - added by thejaswi_puthraya 6 years ago.
git-patch against the latest checkout

Download all attachments as: .zip

Change History (15)

Changed 9 years ago by fonso

comment:1 Changed 9 years ago by adrian

  • Resolution set to fixed
  • Status changed from new to closed

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

comment:2 Changed 7 years ago by hjoreteg

  • Resolution fixed deleted
  • Status changed from closed to reopened

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 6 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 6 years ago by jacob

  • Triage Stage changed from Unreviewed to Accepted

comment:5 Changed 6 years ago by thejaswi_puthraya

  • Component changed from Contrib apps to django.contrib.comments

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

Changed 6 years ago by thejaswi_puthraya

git-patch against the latest checkout

comment:6 Changed 6 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 5 years ago by adamnelson

  • Triage Stage changed from Accepted to Design decision needed

comment:8 Changed 5 years ago by mtredinnick

  • Triage Stage changed from Design decision needed to Accepted

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

comment:9 Changed 5 years ago by lukeplant

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 5 years ago by lukeplant

  • Resolution set to fixed
  • Status changed from reopened to closed

(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 5 years ago by lukeplant

(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 5 years ago by lukeplant

Thanks for the catch jezdez, will fix shortly.

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