Opened 2 months ago
Closed 7 weeks ago
#64673 closed defect (bug) (fixed)
Unnecessary Leading Space in wp-login.php Class Output
| Reported by: |
|
Owned by: |
|
|---|---|---|---|
| Milestone: | 7.0 | Priority: | normal |
| Severity: | minor | Version: | trunk |
| Component: | Login and Registration | Keywords: | has-patch |
| Focuses: | Cc: |
Description
There is an unnecessary leading space in the class attribute construction on line 187 of wp-login.php.
$classes[] = ' locale-' . sanitize_html_class( strtolower( str_replace( '_', '-', get_locale() ) ) );
The class string is generated using:
implode( ' ', $classes )
Since implode( ' ', $classes ) in line 201 already inserts a space between each class name, adding an additional leading space before the output results in a double space in the rendered class attribute.
Expected Behavior
The class attribute should not contain a leading space. The extra space should be removed to ensure clean and consistent markup.
Proposed Fix
Remove the unnecessary leading space before the implode() output so that spacing is handled solely by implode( ' ', $classes ).
Trac ticket: https://core.trac.wordpress.org/ticket/64673
## Description
There is an unnecessary leading space in the class attribute construction on line 187 of wp-login.php.
The class string is generated using:
implode( ' ', $classes )Since
implode( ' ', $classes )in line 201 already inserts a space between each class name, adding an additional leading space before the output results in a double space in the rendered class attribute.## Expected Behavior
The class attribute should not contain a leading space. The extra space should be removed to ensure clean and consistent markup.
## Proposed Fix
Remove the unnecessary leading space before the implode() output so that spacing is handled solely by
implode( ' ', $classes ).## Impact