r91647 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r91646‎ | r91647 | r91648 >
Date:16:06, 7 July 2011
Author:yaron
Status:deferred
Tags:
Comment:
Added trimming of whitespace for 'field' and 'standard input' parameters and param values
Modified paths:
  • /trunk/extensions/SemanticForms/includes/SF_FormPrinter.php (modified) (history)

Diff [purge]

Index: trunk/extensions/SemanticForms/includes/SF_FormPrinter.php
@@ -1138,7 +1138,7 @@
11391139 // cycle through the other components
11401140 for ( $i = 2; $i < count( $tag_components ); $i++ ) {
11411141 $component = $tag_components[$i];
1142 - $sub_components = explode( '=', $component );
 1142+ $sub_components = array_map( 'trim', explode( '=', $component ) );
11431143 if ( count( $sub_components ) == 1 ) {
11441144 if ( $sub_components[0] == 'edittools' ) {
11451145 $free_text_components[] = 'edittools';
@@ -1187,7 +1187,7 @@
11881188 } elseif ( $tag_title == 'info' ) {
11891189 // TODO: Generate an error message if this is included more than once
11901190 foreach ( array_slice( $tag_components, 1 ) as $component ) {
1191 - $sub_components = explode( '=', $component, 2 );
 1191+ $sub_components = array_map( 'trim', explode( '=', $component, 2 ) );
11921192 $tag = $sub_components[0];
11931193 if ( $tag == 'create title' || $tag == 'add title' ) {
11941194 // Handle this only if

Follow-up revisions

RevisionCommit summaryAuthorDate
r91649Follow-up to r91647 - more trimming of form tagsyaron16:19, 7 July 2011