diff --git a/includes/VisualEditorDataModule.php b/includes/VisualEditorDataModule.php index 32f64d6c28..4874cdf3c3 100644 --- a/includes/VisualEditorDataModule.php +++ b/includes/VisualEditorDataModule.php @@ -32,13 +32,11 @@ class VisualEditorDataModule extends ResourceLoaderModule { $plainMessages[ $msgKey ] = $msgObj->plain(); } - return 've.init.platform.addParsedMessages(' . FormatJson::encode( - $parsedMessages, - (bool)ResourceLoader::inDebugMode() + return 've.init.platform.addParsedMessages(' . $context->encodeJson( + $parsedMessages ) . ');' . - 've.init.platform.addMessages(' . FormatJson::encode( - $plainMessages, - (bool)ResourceLoader::inDebugMode() + 've.init.platform.addMessages(' . $context->encodeJson( + $plainMessages ) . ');'; }