[wp-trac] [WordPress Trac] #23878: comment_form function has inconsistent spacing between HTML elements in $fields array

WordPress Trac noreply at wordpress.org
Thu Mar 28 06:01:29 UTC 2013


#23878: comment_form function has inconsistent spacing between HTML elements in
$fields array
-----------------------------+--------------------------
 Reporter:  sim              |       Type:  defect (bug)
   Status:  new              |   Priority:  normal
Milestone:  Awaiting Review  |  Component:  Comments
  Version:  3.5.1            |   Severity:  trivial
 Keywords:                   |
-----------------------------+--------------------------
 In function comment_form (wp-includes/comment-template.php) there are
 several default HTML strings which output the form fields for users
 entering comments to a post.

 The first two, "author" and "email" have a space between the `</label>`
 and the `<input>` elements, whereas the following two fields "url" and
 "comment_field" (from $defaults) do not have spaces between these
 elements.

 From comment-template.php[[BR]]
 line 1524: `'</label> ' .`[[BR]]
 line 1526: `'</label> ' .`[[BR]]
 line 1528: `'</label>' .`[[BR]]
 line 1535: `'</label><textarea`

 Note the spaces after the label element in lines 1524 & 1526 which are
 lacking in lines 1528 and 1535.

 Suggested fix: add a space after the label element on lines 1528 and 1535
 for consistency.

 In the Twenty Eleven and Twenty Twelve themes this does not manifest
 itself as a problem, since the label element is displayed as a block.

 However, if your theme displays the label inline, it manifests itself as a
 difference in spacing between the first two and second two elements, which
 cannot be easily overcome with CSS.

 While this is a trivial issue, it should be ideally fixed for consistency
 and to avoid the need for workarounds when comment labels are displayed
 inline.

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/23878>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list