From e259164d156e1efae90ccefc17903876aaa44658 Mon Sep 17 00:00:00 2001 From: daniel Date: Fri, 8 Jun 2012 09:03:18 +0200 Subject: [PATCH] use Content::getWikitextForTransclusion() when fetching template text --- includes/parser/Parser.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/includes/parser/Parser.php b/includes/parser/Parser.php index 35f187f4d8..6232bce1af 100644 --- a/includes/parser/Parser.php +++ b/includes/parser/Parser.php @@ -3552,7 +3552,13 @@ class Parser { } if ( $rev ) { - $text = $rev->getText(); + $content = $rev->getContent(); + $text = $content->getWikitextForTransclusion(); + + if ( $text === false || $text === null ) { + $text = false; + break; + } } elseif ( $title->getNamespace() == NS_MEDIAWIKI ) { global $wgContLang; $message = wfMessage( $wgContLang->lcfirst( $title->getText() ) )->inContentLanguage(); -- 2.20.1