Commit graph

3 commits

Author SHA1 Message Date
daniel
80d8af47f7 Produce HTML for invalid JSON
implementations of ContentHandler::fillParserOutput MUST set HTML if
$cpoParams->getGenerateHtml() returns true.

Bug: T321319
Change-Id: Ibd43f7420e949666649752dce7072dc35bc1f440
2022-11-03 16:44:47 +01:00
Siddharth VP
3af9036b99 Customise error message for invalid JSON, add hook
When invalid JSON is being saved, change the error message from the
generic "invalid-content-data" to "invalid-json-data" with the specific
error passed as param.

Allow extensions to hook into JSON validation, enabling them to apply
additional validations for specific JSON files such as MediaWiki:*.json
config files. The page identity is passed to the hook.

Bug: T313254
Change-Id: If9590c29ed0b871b03a3db8f13e72ee9cfdd7e2b
2022-08-26 01:22:10 +05:30
Roman Stolar
fa5237eb48 Replace Content::getParserOutput call to ContentRenderer::getParserOutput
Bug: T287158
Change-Id: I8a13f45027e08e2d8ddefa140dd47a0c55094934
2021-10-20 12:11:24 +03:00
Renamed from tests/phpunit/includes/content/JsonContentTest.php (Browse further)