Opened 7 years ago
Closed 6 years ago
#44274 closed defect (bug) (fixed)
htmlspecialchars call in template.php needs to be update
Reported by: | khaihong | Owned by: | johnbillion |
---|---|---|---|
Milestone: | 4.9.7 | Priority: | normal |
Severity: | normal | Version: | |
Component: | Options, Meta APIs | Keywords: | has-patch fixed-major |
Focuses: | Cc: |
Description
Under wp-admin/includes/, the call needs to be changed from
htmlspecialchars($context))
to
htmlspecialchars($context, $flags=NULL, $encoding='UTF-8'))
Otherwise, there are constant debug warnings:
htmlspecialchars(): charset not supported, assuming utf-8
I've had those warnings for themes twenty-fourteen and twenty-seventeen, using only 2 active plugins Query Monitor and Really Simple SSL.
Attachments (6)
Change History (13)
#1
@
7 years ago
- Keywords needs-patch good-first-bug added
- Milestone changed from Awaiting Review to Future Release
#2
@
7 years ago
- Component changed from General to Options, Meta APIs
- Milestone changed from Future Release to 5.0
esc_attr()
accepts 1 parameter, not 3.
#4
@
6 years ago
- Keywords has-patch added; needs-patch good-first-bug removed
- Milestone changed from 5.0 to 4.9.7
- Owner set to johnbillion
- Status changed from new to reviewing
Note: See
TracTickets for help on using
tickets.
Thanks for the report, @khaihong! Welcome to WordPress Trac.
It looks like this warning is coming from the
do_meta_boxes()
function. The$context
parameter should be escaped withesc_attr()
instead ofhtmlspecialchars()
.