#58387 closed defect (bug) (fixed)
Use esc_attr() in _navigation_markup()
| Reported by: | sabernhardt | Owned by: | SergeyBiryukov |
|---|---|---|---|
| Priority: | normal | Milestone: | 6.3 |
| Component: | Themes | Version: | |
| Severity: | normal | Keywords: | has-patch commit |
| Cc: | Focuses: |
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.
@SergeyBiryukov commented on PR #4493:
3 years ago
#12
Thanks for the PR! Merged in r55863.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
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.