Bug 16921. maxlength is not allowed on textareas in HTML4, so this only
works in HTML5. Note that Firefox 3.5 and Opera 9.22 ignore the
attribute (didn't test IE), so this isn't a complete fix. Recent WebKit
does respect the attribute (tested in Chrome 4).
Of course, the length limit of 200 is a hack, just like for edit
summaries, and we really need to move to a non-varchar(255) backend for
all these fields.
Relevant to r45517, r45571.
** Unnecessary type="" attribute removed for CSS and JS.
** If $wgWellFormedXml is set to false, some bytes will be shaved off of HTML
output by omitting some things like quotation marks where HTML 5 allows.
+** (bug 16921) maxlength enabled for page move comments
* The description message in $wgExtensionCredits can be an array with parameters
* New hook SpecialRandomGetRandomTitle allows extensions to modify the selection
criteria used by Special:Random and subclasses, or substitute a custom result,
unset( $attribs['type'] );
}
}
+ if ( $element == 'textarea' && isset( $attribs['maxlength'] ) ) {
+ unset( $attribs['maxlength'] );
+ }
# Here we're blacklisting some HTML5-only attributes...
$html5attribs = array(
'autocomplete',
Xml::label( wfMsg( 'movereason' ), 'wpReason' ) .
"</td>
<td class='mw-input'>" .
- Xml::tags( 'textarea', array( 'name' => 'wpReason', 'id' => 'wpReason', 'cols' => 60, 'rows' => 2 ), htmlspecialchars( $this->reason ) ) .
+ Html::element( 'textarea', array( 'name' => 'wpReason', 'id' => 'wpReason', 'cols' => 60, 'rows' => 2,
+ 'maxlength' => 200 ), $this->reason ) .
"</td>
</tr>"
);