Index: trunk/phase3/includes/HTMLForm.php |
— | — | @@ -1568,16 +1568,19 @@ |
1569 | 1569 | function __construct( $params ) { |
1570 | 1570 | if ( array_key_exists( 'other', $params ) ) { |
1571 | 1571 | } elseif( array_key_exists( 'other-message', $params ) ){ |
1572 | | - $params['other'] = wfMsg( $params['other-message'] ); |
| 1572 | + $params['other'] = wfMessage( $params['other-message'] )->escaped(); |
1573 | 1573 | } else { |
1574 | | - $params['other'] = wfMsg( 'htmlform-selectorother-other' ); |
| 1574 | + $params['other'] = null; |
1575 | 1575 | } |
1576 | 1576 | |
1577 | 1577 | if ( array_key_exists( 'options', $params ) ) { |
1578 | 1578 | # Options array already specified |
1579 | 1579 | } elseif( array_key_exists( 'options-message', $params ) ){ |
1580 | 1580 | # Generate options array from a system message |
1581 | | - $params['options'] = self::parseMessage( wfMsg( $params['options-message'], $params['other'] ) ); |
| 1581 | + $params['options'] = self::parseMessage( |
| 1582 | + wfMessage( $params['options-message'] )->inContentLanguage()->escaped(), |
| 1583 | + $params['other'] |
| 1584 | + ); |
1582 | 1585 | } else { |
1583 | 1586 | # Sulk |
1584 | 1587 | throw new MWException( 'HTMLSelectAndOtherField called without any options' ); |
— | — | @@ -1596,7 +1599,7 @@ |
1597 | 1600 | */ |
1598 | 1601 | public static function parseMessage( $string, $otherName=null ) { |
1599 | 1602 | if( $otherName === null ){ |
1600 | | - $otherName = wfMsg( 'htmlform-selectorother-other' ); |
| 1603 | + $otherName = wfMessage( 'htmlform-selectorother-other' )->escaped(); |
1601 | 1604 | } |
1602 | 1605 | |
1603 | 1606 | $optgroup = false; |