Anomie has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/266261

Change subject: Use ParserOutput::getRawText() where available
......................................................................

Use ParserOutput::getRawText() where available

This is unlikely to be a cause of the cache corruption since the special
page's ParserOutput shouldn't be being cached anyway, but let's fix it
just in case.

Bug: T124356
Change-Id: I06ade4504024a7f1fe3627f2f887d5dadf7a5775
---
M SpecialTemplateSandbox.php
1 file changed, 5 insertions(+), 1 deletion(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/TemplateSandbox 
refs/changes/61/266261/1

diff --git a/SpecialTemplateSandbox.php b/SpecialTemplateSandbox.php
index 83953e6..38ba483 100644
--- a/SpecialTemplateSandbox.php
+++ b/SpecialTemplateSandbox.php
@@ -126,7 +126,11 @@
                        $pageLang = $this->title->getPageLanguage();
                        $attribs = array( 'lang' => $pageLang->getCode(), 'dir' 
=> $pageLang->getDir(),
                                'class' => 'mw-content-' . $pageLang->getDir() 
);
-                       $this->output->setText( Html::rawElement( 'div', 
$attribs, $this->output->getText() ) );
+                       $this->output->setText( Html::rawElement( 'div', 
$attribs,
+                               is_callable( array( $this->output, 'getRawText' 
) )
+                                       ? $this->output->getRawText()
+                                       : $this->output->getText()
+                       ) );
 
                        $output = $this->getOutput();
                        $output->addParserOutput( $this->output );

-- 
To view, visit https://gerrit.wikimedia.org/r/266261
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I06ade4504024a7f1fe3627f2f887d5dadf7a5775
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/TemplateSandbox
Gerrit-Branch: master
Gerrit-Owner: Anomie <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to