Opened 15 years ago
Closed 15 years ago
#8572 closed defect (bug) (fixed)
Admin AJAX responses lack charset headers
Reported by: | janbrasna | Owned by: | |
---|---|---|---|
Milestone: | 2.8 | Priority: | normal |
Severity: | normal | Version: | 2.7 |
Component: | Administration | Keywords: | admin javascript ajax charset encoding |
Focuses: | Cc: |
Description
AJAX responses in admin don't send charset headers.
This is issue mostly for blogs using non–UTF encoding or more obscure and/or misconfigured browsers.
Some browsers inherit the pages' charset, some use preset defaults, some use UTF8, and this produces inconsistent results. Explicit headers should be present to avoid broken characters.
Change History (2)
Note: See
TracTickets for help on using
tickets.
Basically a couple of
header('Content-Type: text/html; charset=' . get_option('blog_charset') );
and/or
header('Content-Type: text/xml; charset=' . get_option('blog_charset') );
is needed throughout the code in
admin-ajax.php
...I'll test a couple of cases to have a patch ready.
(I'm consolidating more bugs like #3633 + #4871 + #6693 here to fix them in one ticket. See them for further details.)