Bump requested Parsoid HTML version to 2.4.0

Visual Editor currently requests MediaWiki DOM version 2.0.0
when talking to Parsoid.  Since Parsoid treats that as a request
for 2.4.0, its current version, and Parsoid doesn't have a
2.4.0->2.0.0 downgrade path, passing the latest Parsoid version
(2.4.0) should make no difference in practice -- but would better
match current reality.

Change-Id: Ia2bc0c1981db6f573a69fb1910cef4304c80ae00
This commit is contained in:
C. Scott Ananian 2022-05-20 12:35:09 -04:00
parent 57dc7aa630
commit ede9ffbd43
2 changed files with 2 additions and 2 deletions

View file

@ -31,7 +31,7 @@ class VisualEditorParsoidClient {
* Keep this in sync with the Accept: header in
* ve.init.mw.ArticleTargetLoader.js
*/
public const PARSOID_VERSION = '2.0.0';
public const PARSOID_VERSION = '2.4.0';
/** @var array Parsoid-specific settings array from $config */
private $parsoidSettings;

View file

@ -366,7 +366,7 @@
var headers = {
// Should be synchronised with VisualEditorParsoidClient.php
Accept: 'text/html; charset=utf-8; profile="https://www.mediawiki.org/wiki/Specs/HTML/2.0.0"',
Accept: 'text/html; charset=utf-8; profile="https://www.mediawiki.org/wiki/Specs/HTML/2.4.0"',
'Accept-Language': mw.config.get( 'wgVisualEditor' ).pageLanguageCode,
'Api-User-Agent': 'VisualEditor-MediaWiki/' + mw.config.get( 'wgVersion' )
};