X-Git-Url: http://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Fhtmlform%2FHTMLForm.php;h=702c2ebc7aa52fd3e9ecd39b613f8919691af834;hb=fd6e9ef2d481209b01fa6e1bb1c863b8257f0272;hp=61d0d8962cbc8c0746fc46c4224b72977d498f63;hpb=4427b84407e03275bdb62ca58a0fde14f3dc7be6;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/htmlform/HTMLForm.php b/includes/htmlform/HTMLForm.php index 61d0d8962c..702c2ebc7a 100644 --- a/includes/htmlform/HTMLForm.php +++ b/includes/htmlform/HTMLForm.php @@ -400,7 +400,13 @@ class HTMLForm extends ContextSource { if ( !in_array( $format, $this->availableDisplayFormats, true ) ) { throw new MWException( 'Display format must be one of ' . - print_r( $this->availableDisplayFormats, true ) ); + print_r( + array_merge( + $this->availableDisplayFormats, + $this->availableSubclassDisplayFormats + ), + true + ) ); } // Evil hack for mobile :( @@ -1686,7 +1692,7 @@ class HTMLForm extends ContextSource { $attributes = []; if ( $fieldsetIDPrefix ) { - $attributes['id'] = Sanitizer::escapeId( "$fieldsetIDPrefix$key" ); + $attributes['id'] = Sanitizer::escapeIdForAttribute( "$fieldsetIDPrefix$key" ); } $subsectionHtml .= $this->wrapFieldSetSection( $legend, $section, $attributes ); } else { @@ -1735,7 +1741,7 @@ class HTMLForm extends ContextSource { ]; if ( $sectionName ) { - $attribs['id'] = Sanitizer::escapeId( $sectionName ); + $attribs['id'] = Sanitizer::escapeIdForAttribute( $sectionName ); } if ( $displayFormat === 'table' ) {