r13917 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r13916‎ | r13917 | r13918 >
Date:02:20, 29 April 2006
Author:robchurch
Status:old
Tags:
Comment:
(bug 93) <nowiki> tags and tildes in templates
Modified paths:
  • /trunk/phase3/RELEASE-NOTES (modified) (history)
  • /trunk/phase3/includes/Parser.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/Parser.php
@@ -3425,7 +3425,7 @@
34263426 );
34273427 $text = str_replace( array_keys( $pairs ), array_values( $pairs ), $text );
34283428 $text = $this->strip( $text, $stripState, true );
3429 - $text = $this->pstPass2( $text, $user );
 3429+ $text = $this->pstPass2( $text, $stripState, $user );
34303430 $text = $this->unstrip( $text, $stripState );
34313431 $text = $this->unstripNoWiki( $text, $stripState );
34323432 return $text;
@@ -3435,13 +3435,13 @@
34363436 * Pre-save transform helper function
34373437 * @private
34383438 */
3439 - function pstPass2( $text, &$user ) {
 3439+ function pstPass2( $text, &$stripState, &$user ) {
34403440 global $wgContLang, $wgLocaltimezone;
34413441
34423442 /* Note: This is the timestamp saved as hardcoded wikitext to
34433443 * the database, we use $wgContLang here in order to give
3444 - * everyone the same signiture and use the default one rather
3445 - * than the one selected in each users preferences.
 3444+ * everyone the same signature and use the default one rather
 3445+ * than the one selected in each user's preferences.
34463446 */
34473447 if ( isset( $wgLocaltimezone ) ) {
34483448 $oldtz = getenv( 'TZ' );
@@ -3457,6 +3457,9 @@
34583458 # Because mOutputType is OT_WIKI, this will only process {{subst:xxx}} type tags
34593459 $text = $this->replaceVariables( $text );
34603460
 3461+ # Strip out <nowiki> etc. added via replaceVariables
 3462+ $text = $this->strip( $text, &$stripState );
 3463+
34613464 # Signatures
34623465 $sigText = $this->getUserSig( $user );
34633466 $text = strtr( $text, array(
Index: trunk/phase3/RELEASE-NOTES
@@ -136,6 +136,7 @@
137137 * (bug 5679): format number on timeanddate() calls for fa: hi: bn:.
138138 * (bug 5751) Updates to Portuguese localisation files
139139 * (bug 5741) Introduce {{NUMBEROFUSERS}} magic word
 140+* (bug 93) <nowiki> tags and tildes in templates
140141
141142 == Compatibility ==
142143

Follow-up revisions

RevisionCommit summaryAuthorDate
r88997fix for Bug #93 “tilde signatures inside nowiki tags sometimes get expanded...mah20:55, 27 May 2011
r89308Revert r88997: fix for bug 93 caused some additional problems....brion00:32, 2 June 2011
r89648Another try at fixing bug 93 "tilde signatures inside nowiki tags sometimes g...pcopp15:12, 7 June 2011
r89662Provisional revert of r89648: "Another try at fixing bug 93 "tilde signatures...brion17:34, 7 June 2011

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r5295BUG#93 Fix handling of <nowiki> in templatesjeluf23:14, 18 September 2004
r5296BUG#93 Fix handling of <nowiki> in templates. From HEADjeluf23:17, 18 September 2004

Status & tagging log