Avoid polluting the parser cache with skin-dependent output from
Skin::doEditSectionLink() by introducing getRawText(), which provides
access to the uncooked text. Use this in
WikitextContent::fillParserOutput() which is the primary offender
judging by the debug logs (see referenced bug).
Bug: T124356
Change-Id: Ia9e1e4a6dc3a26f88eeebc64eed023ff20c53d58
$chain = $this->getRedirectChain();
$output->setText(
Article::getRedirectHeaderHtml( $title->getPageLanguage(), $chain, false ) .
- $output->getText()
+ $output->getRawText()
);
$output->addModuleStyles( 'mediawiki.action.view.redirectPage' );
}
$this->mTitleText = $titletext;
}
+ /**
+ * Get the cacheable text with <mw:editsection> markers still in it. The
+ * return value is suitable for writing back via setText() but is not valid
+ * for display to the user.
+ *
+ * @since 1.27
+ */
+ public function getRawText() {
+ return $this->mText;
+ }
+
public function getText() {
$text = $this->mText;
if ( $this->mEditSectionTokens ) {