mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/TemplateData
synced 2024-11-27 09:10:00 +00:00
No HTML needed to validate <templatedata> in wikitext
I tried to benchmark this and yes, it makes a difference, but probably not a big one. This is an additional parse in addition to the one core will later do when the page is actually saved. For this one here we are just not interested in the HTML. Bug: T305105 Change-Id: I71147af5161c934a822651e80e11f3bd26af56cd
This commit is contained in:
parent
9de8c46234
commit
1c8b4ae729
|
@ -97,7 +97,7 @@ class Hooks {
|
|||
|
||||
// Revision hasn't been parsed yet, so parse to know if self::render got a
|
||||
// valid tag (via inclusion and transclusion) and abort save if it didn't
|
||||
$parserOutput = $renderedRevision->getRevisionParserOutput();
|
||||
$parserOutput = $renderedRevision->getRevisionParserOutput( [ 'generate-html' => false ] );
|
||||
$templateDataStatus = self::getStatusFromParserOutput( $parserOutput );
|
||||
if ( $templateDataStatus instanceof Status && !$templateDataStatus->isOK() ) {
|
||||
// Abort edit, show error message from TemplateDataBlob::getStatus
|
||||
|
|
Loading…
Reference in a new issue