Merge "Perform a permission check on the title when changing the page language"
[lhc/web/wiklou.git] / includes / htmlform / fields / HTMLRadioField.php
index 69dc617..77ea7cd 100644 (file)
@@ -27,7 +27,7 @@ class HTMLRadioField extends HTMLFormField {
                }
 
                if ( !is_string( $value ) && !is_int( $value ) ) {
-                       return $this->msg( 'htmlform-required' )->parse();
+                       return $this->msg( 'htmlform-required' );
                }
 
                $validOptions = HTMLFormField::flattenOptions( $this->getOptions() );
@@ -35,7 +35,7 @@ class HTMLRadioField extends HTMLFormField {
                if ( in_array( strval( $value ), $validOptions, true ) ) {
                        return true;
                } else {
-                       return $this->msg( 'htmlform-select-badoption' )->parse();
+                       return $this->msg( 'htmlform-select-badoption' );
                }
        }
 
@@ -90,7 +90,7 @@ class HTMLRadioField extends HTMLFormField {
                                $html .= Html::rawElement( 'h1', [], $label ) . "\n";
                                $html .= $this->formatOptions( $info, $value );
                        } else {
-                               $id = Sanitizer::escapeId( $this->mID . "-$info" );
+                               $id = Sanitizer::escapeIdForAttribute( $this->mID . "-$info" );
                                $classes = [ 'mw-htmlform-flatlist-item' ];
                                if ( $wgUseMediaWikiUIEverywhere || $this->mParent instanceof VFormHTMLForm ) {
                                        $classes[] = 'mw-ui-radio';