r91649 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r91648‎ | r91649 | r91650 >
Date:16:19, 7 July 2011
Author:yaron
Status:deferred
Tags:
Comment:
Follow-up to r91647 - more trimming of form tags
Modified paths:
  • /trunk/extensions/SemanticForms/includes/SF_FormPrinter.php (modified) (history)

Diff [purge]

Index: trunk/extensions/SemanticForms/includes/SF_FormPrinter.php
@@ -449,7 +449,7 @@
450450 $component = $tag_components[$i];
451451 if ( $component == 'multiple' ) $allow_multiple = true;
452452 if ( $component == 'strict' ) $strict_parsing = true;
453 - $sub_components = explode( '=', $component, 2 );
 453+ $sub_components = array_map( 'trim', explode( '=', $component, 2 ) );
454454 if ( count( $sub_components ) == 2 ) {
455455 if ( $sub_components[0] == 'label' ) {
456456 $template_label = $sub_components[1];
@@ -678,7 +678,7 @@
679679 } elseif ( $component == 'edittools' ) { // free text only
680680 $free_text_components[] = 'edittools';
681681 } else {
682 - $sub_components = explode( '=', $component, 2 );
 682+ $sub_components = array_map( 'trim', explode( '=', $component, 2 ) );
683683 if ( count( $sub_components ) == 1 ) {
684684 // add handling for single-value params, for custom input types
685685 $field_args[$sub_components[0]] = null;

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r91647Added trimming of whitespace for 'field' and 'standard input' parameters and ...yaron16:06, 7 July 2011