maxlength=200 for page move summary in HTML5
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.
This commit is contained in:
parent
291efd30f2
commit
e71ffbd5ba
3 changed files with 6 additions and 1 deletions
|
|
@ -218,6 +218,7 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN
|
|||
** 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,
|
||||
|
|
|
|||
|
|
@ -134,6 +134,9 @@ class Html {
|
|||
unset( $attribs['type'] );
|
||||
}
|
||||
}
|
||||
if ( $element == 'textarea' && isset( $attribs['maxlength'] ) ) {
|
||||
unset( $attribs['maxlength'] );
|
||||
}
|
||||
# Here we're blacklisting some HTML5-only attributes...
|
||||
$html5attribs = array(
|
||||
'autocomplete',
|
||||
|
|
|
|||
|
|
@ -218,7 +218,8 @@ class MovePageForm {
|
|||
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>"
|
||||
);
|
||||
|
|
|
|||
Loading…
Reference in a new issue