standard, nostalgia and cologneblue skin
* (bug 19814) interwiki links from file links ([[File:Foo.jpg|link=de:Test]])
are no longer recorded in the pagelinks table
+* (bug 19784) date option "ISO 8601" produced illegal id
== API changes in 1.16 ==
}
if ( isset( $params['name'] ) ) {
- $this->mName = 'wp'.$params['name'];
- $this->mID = 'mw-input-'.$params['name'];
+ $name = $params['name'];
+ $validName = Sanitizer::escapeId( $name );
+ if( $name != $validName ) {
+ throw new MWException("Invalid name '$name' passed to " . __METHOD__ );
+ }
+ $this->mName = 'wp'.$name;
+ $this->mID = 'mw-input-'.$name;
}
if ( isset( $params['default'] ) ) {
}
if ( isset( $params['id'] ) ) {
- $this->mID = $params['id'];
+ $id = $params['id'];
+ $validId = Sanitizer::escapeId( $id );
+ if( $id != $validId ) {
+ throw new MWException("Invalid id '$id' passed to " . __METHOD__ );
+ }
+ $this->mID = $id;
}
if ( isset( $params['validation-callback'] ) ) {
$html .= Xml::tags( 'h1', null, $label ) . "\n";
$html .= $this->formatOptions( $info, $value );
} else {
+ $id = Sanitizer::escapeId( $this->mID . "-$info" );
$html .= Xml::radio( $this->mName, $info, $info == $value,
- $attribs + array( 'id' => $this->mID . "-$info" ) );
+ $attribs + array( 'id' => $id ) );
$html .= ' ' .
- Xml::tags( 'label', array( 'for' => $this->mID . "-$info" ), $label );
+ Xml::tags( 'label', array( 'for' => $id ), $label );
$html .= "<br/>\n";
}