r67729 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r67728‎ | r67729 | r67730 >
Date:15:58, 9 June 2010
Author:yaron
Status:deferred
Tags:
Comment:
Added handling for whitespaces around parameters and their values for #formlink, #forminput
Modified paths:
  • /trunk/extensions/SemanticForms/includes/SF_ParserFunctions.php (modified) (history)

Diff [purge]

Index: trunk/extensions/SemanticForms/includes/SF_ParserFunctions.php
@@ -139,10 +139,10 @@
140140 foreach ( $params as $i => $param ) {
141141 $elements = explode( '=', $param, 2 );
142142 $param_name = null;
143 - $value = $param;
 143+ $value = trim( $param );
144144 if ( count( $elements ) > 1 ) {
145 - $param_name = $elements[0];
146 - $value = $elements[1];
 145+ $param_name = trim( $elements[0] );
 146+ $value = trim( $elements[1] );
147147 }
148148 if ( $param_name == 'form' )
149149 $inFormName = $value;
@@ -212,10 +212,10 @@
213213 foreach ( $params as $i => $param ) {
214214 $elements = explode( '=', $param, 2 );
215215 $param_name = null;
216 - $value = $param;
 216+ $value = trim( $param );
217217 if ( count( $elements ) > 1 ) {
218 - $param_name = $elements[0];
219 - $value = $elements[1];
 218+ $param_name = trim( $elements[0] );
 219+ $value = trim( $elements[1] );
220220 }
221221 if ( $param_name == 'form' )
222222 $inFormName = $value;

Status & tagging log