#58387 closed defect (bug) (fixed)
Use esc_attr() in _navigation_markup()
| Reported by: |
|
Owned by: |
|
|---|---|---|---|
| Milestone: | 6.3 | Priority: | normal |
| Severity: | normal | Version: | |
| Component: | Themes | Keywords: | has-patch commit |
| Focuses: | Cc: |
Description
The esc_attr escaping function should be more appropriate for the aria-label attribute than esc_html.
source:/tags/6.2/src/wp-includes/link-template.php#L3024
Attachments (1)
Change History (13)
This ticket was mentioned in PR #4493 on WordPress/wordpress-develop by @sabernhardt.
3 years ago
#5
Trac ticket: https://core.trac.wordpress.org/ticket/58387
@mukesh27 commented on PR #4493:
3 years ago
#8
@sabernhardt one question: $aria_label is use value of $screen_reader_text so do we need to update $screen_reader_text also?
@sabernhardt commented on PR #4493:
3 years ago
#9
The standard template uses the $screen_reader_text variable inside an h2 element.
(Without an $aria_label argument, the function would reuse $screen_reader_text for both the aria-label attribute and the heading. They still would have different escaping functions.)
@mukesh27 commented on PR #4493:
3 years ago
#10
Make sense, thanks @sabernhardt for clarification.
#11
@
3 years ago
- Owner set to SergeyBiryukov
- Resolution set to fixed
- Status changed from new to closed
In 55863:
@SergeyBiryukov commented on PR #4493:
3 years ago
#12
Thanks for the PR! Merged in r55863.
Makes sense and the patch looks straightforward.
@sabernhardt does the whole unit test suite still pass locally? Just in case this causes an unexpected failure somewhere along the line.