Index: trunk/phase3/includes/Preferences.php |
— | — | @@ -291,20 +291,17 @@ |
292 | 292 | ); |
293 | 293 | } |
294 | 294 | |
295 | | - global $wgMaxSigChars, $wgParser; |
| 295 | + global $wgMaxSigChars, $wgOut, $wgParser; |
296 | 296 | |
297 | 297 | // show a preview of the old signature first |
298 | | - $oldsigtext = $wgParser->preSaveTransform( "~~~", new Title , $user, new ParserOptions ); |
299 | | - $oldsig = $wgParser->parse( $oldsigtext, new Title , new ParserOptions ); |
300 | | - $m = array(); // remove <p> created by the parser (looks better without <p>) |
301 | | - if( preg_match( '/^<p>(.*)\n?<\/p>\n?$/sU', $oldsig->mText, $m ) ) $oldsig->mText = $m[1]; |
302 | | - |
| 298 | + $oldsigWikiText = $wgParser->preSaveTransform( "~~~", new Title , $user, new ParserOptions ); |
| 299 | + $oldsigHTML = $wgOut->parseInline( $oldsigWikiText ); |
303 | 300 | $defaultPreferences['oldsig'] = |
304 | 301 | array( |
305 | 302 | 'type' => 'info', |
306 | 303 | 'raw' => true, |
307 | 304 | 'label-message' => 'tog-oldsig', |
308 | | - 'default' => $oldsig->mText, |
| 305 | + 'default' => $oldsigHTML, |
309 | 306 | 'section' => 'personal/signature', |
310 | 307 | ); |
311 | 308 | $defaultPreferences['nickname'] = |