#10815 closed defect (bug) (invalid)
Admin page, missing charset errors in ajax requests when apache is configured with default charset
| Reported by: |
|
Owned by: | |
|---|---|---|---|
| Milestone: | Priority: | normal | |
| Severity: | trivial | Version: | 2.8.4 |
| Component: | General | Keywords: | ajax, charset, admin, response |
| Focuses: | Cc: |
Description
When (for example) a new category is added in the edit post page, the ajax response header contains only the text/xml content-type attribute, but "charset" is missing, so if Apache is configured with AddDefaultCharset iso-8859-2, but blog_charset is set to UTF-8 there will be a garbled response.
the quick fix for this bug is to replace the WP_Ajax_Response->send() method in the wp-includes/classes.php file to this:
function send() {
header('Content-Type: text/xml; charset='.get_option('blog_charset'));
echo "<?xml version='1.0' standalone='yes'?><wp_ajax>";
foreach ( (array) $this->responses as $response )
echo $response;
echo '</wp_ajax>';
die();
}
Change History (2)
Note: See
TracTickets for help on using
tickets.
Check #10817 for a better solution and description about this bug.