} elseif( is_int($t) ) {
$options[$v] = $wgRequest->getInt( $v, $options[$v] );
} elseif( is_string($t) ) {
- $options[$v] = $wgRequest->getText( $v, $options[$v] );
+ $options[$v] = trim( $wgRequest->getVal( $v, $options[$v] ) );
}
}
$hidden[] = Xml::hidden( $key, $value );
}
$hidden = implode( "\n", $hidden );
+
+ $ut = Title::makeTitleSafe( NS_USER, $options['username'] );
+ $encUser = $ut ? $ut->getText() : '';
$form = Xml::openElement( 'form', array( 'method' => 'get', 'action' => $wgScript ) ) .
Xml::hidden( 'title', $self->getPrefixedDBkey() ) .
Xml::label( wfMsg( 'newpages-username' ), 'mw-np-username' ) .
"</td>
<td class='mw-input'>" .
- Xml::input( 'username', 30, $options['username'], array( 'id' => 'mw-np-username' ) ) .
+ Xml::input( 'username', 30, $encUser, array( 'id' => 'mw-np-username' ) ) .
"</td>
</tr>" : "" ) .
"<tr> <td></td>