[wp-trac] [WordPress Trac] #63053: Missing space before selected attribute for post edit page "users"
WordPress Trac
noreply at wordpress.org
Tue Mar 4 23:43:13 UTC 2025
#63053: Missing space before selected attribute for post edit page "users"
-----------------------------------------+-------------------------------
Reporter: kkmuffme | Owner: joedolson
Type: defect (bug) | Status: accepted
Priority: normal | Milestone: 6.8
Component: Users | Version: 3.0
Severity: trivial | Resolution:
Keywords: has-patch reporter-feedback | Focuses: coding-standards
-----------------------------------------+-------------------------------
Changes (by sabernhardt):
* keywords: has-patch => has-patch reporter-feedback
Comment:
The `selected()` function uses `__checked_selected_helper()`, which
includes a [https://github.com/WordPress/wordpress-
develop/blob/ac057e6c692e7e88b1758eb8dc6dee2312bb5c7b/src/wp-includes
/general-template.php#L5250 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.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/63053#comment:3>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list