# Sig. might contain markup; validate this
if( $this->validateSig( $nickname ) !== false ) {
# Validated; clean up (if needed) and return it
- return( $this->cleanSig( $nickname ) );
+ return( $this->cleanSig( $nickname, true ) );
} else {
# Failed to validate; fall back to the default
$nickname = $username;
* @param string $text
* @return string Text
*/
- function cleanSig( $text ) {
+ function cleanSig( $text, $parsing = false ) {
$mw = MagicWord::get( MAG_SUBST );
$substre = $mw->getBaseRegex();
$subst = $mw->getSynonym( 0 );
);
$text = preg_replace( '/~{3,5}/', '', $text );
- $text = $this->replaceVariables( $text );
+ if( $parsing) {
+ $text = $this->replaceVariables( $text );
+ }
return $text;