Permalink
Browse files

fix(http): more resources sent with explicit UTF-8 charset

Some of these were missed in #9349.

Fixes #9345
  • Loading branch information...
mrclay committed Feb 9, 2016
1 parent 6fd38c6 commit 036a82bd78da47bb6963a87e5f68b1eef88d85eb
Showing with 5 additions and 5 deletions.
  1. +1 −1 engine/lib/actions.php
  2. +1 −1 engine/lib/admin.php
  3. +2 −2 engine/lib/elgglib.php
  4. +1 −1 engine/lib/input.php
View
@@ -286,7 +286,7 @@ function _elgg_csrf_token_refresh() {
'logged_in' => elgg_is_logged_in(),
);
- header("Content-Type: application/json");
+ header("Content-Type: application/json;charset=utf-8");
echo json_encode($data);
return true;
View
@@ -684,7 +684,7 @@ function _elgg_admin_markdown_page_handler($pages) {
*/
function _elgg_robots_page_handler() {
$site = elgg_get_site_entity();
- header("Content-type: text/plain");
+ header("Content-type: text/plain;charset=utf-8");
$content = $site->getPrivateSetting('robots.txt');
$plugin_content = elgg_trigger_plugin_hook('robots.txt', 'site', array('site' => $site), '');
if ($plugin_content) {
View
@@ -1615,7 +1615,7 @@ function _elgg_cacheable_view_page_handler($page, $type) {
}
$return = elgg_view($view);
- header("Content-type: $content_type");
+ header("Content-type: $content_type;charset=utf-8");
// @todo should js be cached when simple cache turned off
//header('Expires: ' . gmdate('D, d M Y H:i:s \G\M\T', strtotime("+10 days")), true);
@@ -1899,7 +1899,7 @@ function _elgg_init() {
elgg_register_page_handler('manifest.json', function() {
$site = elgg_get_site_entity();
$resource = new \Elgg\Http\WebAppManifestResource($site);
- header('Content-Type: application/json');
+ header('Content-Type: application/json;charset=utf-8');
echo json_encode($resource->get());
return true;
});
View
@@ -388,7 +388,7 @@ function input_livesearch_page_handler($page) {
}
ksort($results);
- header("Content-Type: application/json");
+ header("Content-Type: application/json;charset=utf-8");
echo json_encode(array_values($results));
exit;
}

0 comments on commit 036a82b

Please sign in to comment.