From 25653183b8bc55170a19ee999ef6238fd235ebc0 Mon Sep 17 00:00:00 2001 From: Rob Church Date: Sat, 29 Apr 2006 02:20:30 +0000 Subject: [PATCH] (bug 93) tags and tildes in templates --- RELEASE-NOTES | 1 + includes/Parser.php | 11 +++++++---- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/RELEASE-NOTES b/RELEASE-NOTES index e51be3c4a6..c0cd88d2db 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -136,6 +136,7 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN * (bug 5679): format number on timeanddate() calls for fa: hi: bn:. * (bug 5751) Updates to Portuguese localisation files * (bug 5741) Introduce {{NUMBEROFUSERS}} magic word +* (bug 93) tags and tildes in templates == Compatibility == diff --git a/includes/Parser.php b/includes/Parser.php index 68ef1a3fcc..fcbb603a16 100644 --- a/includes/Parser.php +++ b/includes/Parser.php @@ -3425,7 +3425,7 @@ class Parser ); $text = str_replace( array_keys( $pairs ), array_values( $pairs ), $text ); $text = $this->strip( $text, $stripState, true ); - $text = $this->pstPass2( $text, $user ); + $text = $this->pstPass2( $text, $stripState, $user ); $text = $this->unstrip( $text, $stripState ); $text = $this->unstripNoWiki( $text, $stripState ); return $text; @@ -3435,13 +3435,13 @@ class Parser * Pre-save transform helper function * @private */ - function pstPass2( $text, &$user ) { + function pstPass2( $text, &$stripState, &$user ) { global $wgContLang, $wgLocaltimezone; /* Note: This is the timestamp saved as hardcoded wikitext to * the database, we use $wgContLang here in order to give - * everyone the same signiture and use the default one rather - * than the one selected in each users preferences. + * everyone the same signature and use the default one rather + * than the one selected in each user's preferences. */ if ( isset( $wgLocaltimezone ) ) { $oldtz = getenv( 'TZ' ); @@ -3457,6 +3457,9 @@ class Parser # Because mOutputType is OT_WIKI, this will only process {{subst:xxx}} type tags $text = $this->replaceVariables( $text ); + # Strip out etc. added via replaceVariables + $text = $this->strip( $text, &$stripState ); + # Signatures $sigText = $this->getUserSig( $user ); $text = strtr( $text, array( -- 2.20.1