Make WordPress Core

Opened 16 months ago

Closed 16 months ago

Last modified 5 months ago

#63053 closed defect (bug) (invalid)

Missing space before selected attribute for post edit page "users"

Reported by: kkmuffme's profile kkmuffme Owned by: joedolson's profile joedolson
Milestone: 6.8 Priority: normal
Severity: trivial Version: 3.0
Component: Users Keywords: has-patch reporter-feedback
Focuses: coding-standards Cc:

Description

on any edit page e.g. /wp-admin/post.php?post=1234&action=edit

Attachments (2)

selected.png (40.2 KB) - added by kkmuffme 16 months ago.
post-author-metabox-selected.png (13.9 KB) - added by sabernhardt 16 months ago.
Author metabox dropdown, in trunk, with space and quotes for selected author

Download all attachments as: .zip

Change History (7)

@kkmuffme
16 months ago

This ticket was mentioned in PR #8459 on WordPress/wordpress-develop by @kkmuffme.


16 months ago
#1

  • Keywords has-patch added

#2 @joedolson
16 months ago

  • Focuses coding-standards added
  • Milestone changed from Awaiting Review to 6.8
  • Owner set to joedolson
  • Status changed from new to accepted
  • Version set to 3.0

Introduced in [14779]. Well, that's been there for a while!

@sabernhardt
16 months ago

Author metabox dropdown, in trunk, with space and quotes for selected author

#3 @sabernhardt
16 months ago

  • Keywords reporter-feedback added

The selected() function uses __checked_selected_helper(), which includes a space before the attribute and single quotes around the value:
$result = " $type='$type'";

"selected.png" shows <option value='707'selected=selected> without either the space or the quotes. Does your site use a filter on these attributes?

[59889] already added unnecessary spaces in checkbox markup, which I do not consider a problem. However, adding an extra space in the user dropdown causes unit test failures.

#4 @kkmuffme
16 months ago

  • Resolution set to invalid
  • Status changed from accepted to closed

Thanks for pointing this out, it turned out my IDE code style settings caused this, when I had this file opened and saved accidentally, causing it to reformat incorrectly.

@SergeyBiryukov commented on PR #8459:


5 months ago
#5

Thanks for the PR! Closing for now, as the associated Trac ticket has been closed.

Note: See TracTickets for help on using tickets.