Index: trunk/extensions/SemanticForms/includes/SF_FormInputs.php |
— | — | @@ -352,7 +352,7 @@ |
353 | 353 | } |
354 | 354 | } |
355 | 355 | |
356 | | - $text .= "\t" . Xml::hidden( $input_name . '[is_list]', 1 ) . "\n"; |
| 356 | + $text .= "\n" . Xml::hidden( $input_name . '[is_list]', 1 ) . "\n"; |
357 | 357 | $outerSpanAttrs = array( 'id' => $outerSpanID, 'class' => $outerSpanClass ); |
358 | 358 | $text = "\t" . Xml::tags( 'span', $outerSpanAttrs, $text ) . "\n"; |
359 | 359 | |
— | — | @@ -519,7 +519,7 @@ |
520 | 520 | if ( array_key_exists( 'maxlength', $other_args ) ) { |
521 | 521 | $text .= ' maxlength="' . $other_args['maxlength'] . '"'; |
522 | 522 | } |
523 | | - $text = "\t" . Xml::element( 'input', $inputAttrs ) . "\n"; |
| 523 | + $text = "\n\t" . Xml::element( 'input', $inputAttrs ) . "\n"; |
524 | 524 | } |
525 | 525 | // is_list and delimiter variables - needed later |
526 | 526 | $is_list = ( array_key_exists( 'is_list', $other_args ) && $other_args['is_list'] == true ); |
— | — | @@ -543,7 +543,7 @@ |
544 | 544 | |
545 | 545 | $spanClass = "inputSpan"; |
546 | 546 | if ( $is_mandatory ) { $spanClass .= " mandatoryFieldSpan"; } |
547 | | - $text = Xml::tags( 'span', array( 'class' => $spanClass ), $text ); |
| 547 | + $text = "\n" . Xml::tags( 'span', array( 'class' => $spanClass ), $text ); |
548 | 548 | |
549 | 549 | $options_str_key = $autocompletion_source; |
550 | 550 | if ( $is_list ) { |
— | — | @@ -960,6 +960,8 @@ |
961 | 961 | $wgCategoryTreeMaxDepth = 10; |
962 | 962 | $tree = efCategoryTreeParserHook( $top_category, array( 'mode' => 'categories', 'depth' => 10 ) ); |
963 | 963 | |
| 964 | + // CategoryTree HTML-escapes all values |
| 965 | + $cur_value = htmlentities( $cur_value ); |
964 | 966 | // capitalize the first letter, if first letters always get capitalized |
965 | 967 | global $wgCapitalLinks; |
966 | 968 | if ( $wgCapitalLinks ) { |
— | — | @@ -1035,6 +1037,8 @@ |
1036 | 1038 | } |
1037 | 1039 | // set all checkboxes matching $cur_values to checked |
1038 | 1040 | foreach ( $cur_values as $value ) { |
| 1041 | + // CategoryTree HTML-escapes all values |
| 1042 | + $value = htmlentities( $value ); |
1039 | 1043 | // capitalize the first letter, if first letters always get capitalized |
1040 | 1044 | if ( $wgCapitalLinks ) { |
1041 | 1045 | global $wgContLang; |
— | — | @@ -1052,7 +1056,7 @@ |
1053 | 1057 | $text .= "\t" . Xml::hidden( $input_name . '[is_list]', 1 ) . "\n"; |
1054 | 1058 | $spanClass = "checkboxesSpan"; |
1055 | 1059 | if ( $is_mandatory) { $spanClass .= " mandatoryFieldSpan"; } |
1056 | | - $text = "\t" . Xml::tags( 'span', array( 'class' => $spanClass ), $text ) . "\n"; |
| 1060 | + $text = "\n" . Xml::tags( 'span', array( 'class' => $spanClass ), $text ) . "\n"; |
1057 | 1061 | |
1058 | 1062 | return $text; |
1059 | 1063 | } |