#56064 closed enhancement (fixed)
PHPCS issue in wp-admin/include/media.php .
| Reported by: | smit08 | Owned by: | SergeyBiryukov |
|---|---|---|---|
| Priority: | normal | Milestone: | 6.1 |
| Component: | Media | Version: | |
| Severity: | normal | Keywords: | has-patch commit |
| Cc: | Focuses: | coding-standards |
Description
Used escaping function esc_attr instead of esc_url.
$html = '<a href="' . esc_attr( $url ) . '"' . $rel . '>' . $html . '</a>';
Attachments (1)
Change History (6)
#1
@
4 years ago
- Focuses coding-standards added
- Keywords has-patch commit added; needs-patch removed
#3
@
4 years ago
Hi there, thanks for the patch!
It looks like esc_attr() was used here as of [12051] / #10252, since esc_url() did not work correctly with some accented characters at the time, see #10859.
Since #10859 was fixed in [12199], and esc_url() no longer returns an empty string for the URL listed there in my testing, I think we should indeed be able to use esc_url() here.
Note:
See TracTickets
for help on using tickets.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
Hi there!
Thanks for the ticket and patch. The 56064.patch patch makes sense to me and it's better to check the correct escape function for URL's enhancement.
commitkeyword added.