Make WordPress Core

Opened 5 years ago

Closed 5 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:


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)

comment:1 janbrasna5 years ago

Basically a couple of
header('Content-Type: text/html; charset=' . get_option('blog_charset') );
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.)

comment:2 ryan5 years ago

  • Resolution set to fixed
  • Status changed from new to closed

Fixed in [10375]

Note: See TracTickets for help on using tickets.