diff --git a/ApiVisualEditor.php b/ApiVisualEditor.php index 7bb83a55d3..f57c3f9e6d 100644 --- a/ApiVisualEditor.php +++ b/ApiVisualEditor.php @@ -96,7 +96,7 @@ class ApiVisualEditor extends ApiBase { $request['body'] = $params; } // Should be synchronised with modules/ve-mw/init/ve.init.mw.ArticleTargetLoader.js - $reqheaders['Accept'] = 'text/html;profile=mediawiki.org/specs/html/1.2.0'; + $reqheaders['Accept'] = 'text/html; charset=utf-8; profile="mediawiki.org/specs/html/1.2.0"'; $request['headers'] = $reqheaders; $response = $this->serviceClient->run( $request ); if ( $response['code'] === 200 && $response['error'] === "" ) { diff --git a/modules/ve-mw/init/ve.init.mw.ArticleTargetLoader.js b/modules/ve-mw/init/ve.init.mw.ArticleTargetLoader.js index 71703a6cfc..9c4dea55b6 100644 --- a/modules/ve-mw/init/ve.init.mw.ArticleTargetLoader.js +++ b/modules/ve-mw/init/ve.init.mw.ArticleTargetLoader.js @@ -151,7 +151,7 @@ stash: 'true' }, // Should be synchronised with ApiVisualEditor.php - headers: { Accept: 'text/html;profile=mediawiki.org/specs/html/1.2.0' }, + headers: { Accept: 'text/html; charset=utf-8; profile="mediawiki.org/specs/html/1.2.0"' }, dataType: 'text' } ); } else { @@ -165,7 +165,7 @@ ( oldid === undefined ? '' : '/' + oldid ), type: 'GET', // Should be synchronised with ApiVisualEditor.php - headers: { Accept: 'text/html;profile=mediawiki.org/specs/html/1.2.0' }, + headers: { Accept: 'text/html; charset=utf-8; profile="mediawiki.org/specs/html/1.2.0"' }, dataType: 'text' } ); }