Work around Parsoid's messy handling of some extensions

* See T351461#9358034 for details

Bug: T351461
Change-Id: If438e99284018e3b78f4c2fc22ce714322877cf7
This commit is contained in:
Subramanya Sastry 2023-11-26 22:04:06 -06:00
parent 8ab8831db7
commit bea2b1478d

View file

@ -362,7 +362,10 @@ class CommentFormatter {
return $item->jsonSerialize( true );
}, $threadItemSet->getThreadsStructured() );
$pout->setJsConfigVar( 'wgDiscussionToolsPageThreads', $threadsJSON );
// Temporary hack to deal with T351461#9358034: this should be a
// call to `setJsConfigVar` but Parsoid is currently reprocessing
// content from extensions.
$pout->addJsConfigVars( 'wgDiscussionToolsPageThreads', $threadsJSON );
// Like DOMCompat::getInnerHTML(), but disable 'smartQuote' for compatibility with
// ParserOutput::EDITSECTION_REGEX matching 'mw:editsection' tags (T274709)