Make WordPress Core

Opened 7 years ago

Closed 7 years ago

#3787 closed defect (bug) (fixed)

comments.php template validation broken

Reported by: tandilboy Owned by: rob1n
Milestone: 2.2 Priority: normal
Severity: normal Version: 2.1
Component: Template Keywords: has-patch commit
Focuses: Cc:


w3c validator shows this error

Error Line 122 column 13: syntax of attribute value does not conform to declared value.
		<li class="" id="comment-1869">

The value of an attribute contained something that is not allowed by the specified syntax for that type of attribute. For instance, the “selected” attribute must be either minimized as “selected” or spelled out in full as “selected="selected"”; the variant “selected=""” is not allowed.

Attachments (3)

3787.diff (1.1 KB) - added by rob1n 7 years ago.
3787.2.diff (1.1 KB) - added by rob1n 7 years ago.
3787.3.diff (1.1 KB) - added by rob1n 7 years ago.

Download all attachments as: .zip

Change History (8)

rob1n7 years ago

comment:1 rob1n7 years ago

  • Keywords has-patch commit added
  • Owner changed from anonymous to rob1n
  • Status changed from new to assigned

Patch 3787.diff does a simple hack, works as advertised.

Validation was screwed up because on the non-highlighted comments (every other), class="" was the class attribute, and apparently empty attributes aren't valid.

comment:2 rob1n7 years ago

  • Milestone changed from 2.1.1 to 2.2

rob1n7 years ago

comment:3 rob1n7 years ago

Added a new patch which uses ryan's idea of cleaner coding.


rob1n7 years ago

comment:4 rob1n7 years ago

Latest patch incorporates MarkJaquith's recommendation of making the code even more compact.

comment:5 ryan7 years ago

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

(In [4922]) Don't emit empty class. Props rob1n. fixes #3787

Note: See TracTickets for help on using tickets.