r67406 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r67405‎ | r67406 | r67407 >
Date:16:40, 5 June 2010
Author:nikerabbit
Status:ok
Tags:
Comment:
Change regexp slightly so it doesn't fail on big pages
Modified paths:
  • /trunk/extensions/Translate/tag/TPParse.php (modified) (history)

Diff [purge]

Index: trunk/extensions/Translate/tag/TPParse.php
@@ -157,7 +157,7 @@
158158
159159 // Remove translation markup
160160 $cb = array( __CLASS__, 'replaceTagCb' );
161 - $text = preg_replace_callback( '~(<translate>\n?)(.*?)(\n?</translate>)~s', $cb, $text );
 161+ $text = preg_replace_callback( '~(<translate>\n?)(.*)(</translate>\n?)~sU', $cb, $text );
162162 $text = TranslatablePage::unArmourNowiki( $nph, $text );
163163
164164 return $text;

Status & tagging log