Index: trunk/extensions/SemanticForms/includes/SF_ParserFunctions.php |
— | — | @@ -190,7 +190,7 @@ |
191 | 191 | } elseif ( $param_name == 'link type' ) { |
192 | 192 | $inLinkType = $value; |
193 | 193 | } elseif ( $param_name == 'query string' ) { |
194 | | - $inQueryStr = $value; |
| 194 | + $inQueryStr = Sanitizer::decodeCharReferences( $value ); |
195 | 195 | } elseif ( $param_name == 'tooltip' ) { |
196 | 196 | $inTooltip = Sanitizer::decodeCharReferences( $value ); |
197 | 197 | } elseif ( $param_name == 'target' ) { |
— | — | @@ -206,7 +206,7 @@ |
207 | 207 | } elseif ( $i == 2 ) { |
208 | 208 | $inLinkType = $value; |
209 | 209 | } elseif ( $i == 3 ) { |
210 | | - $inQueryStr = $value; |
| 210 | + $inQueryStr = Sanitizer::decodeCharReferences( $value ); |
211 | 211 | } |
212 | 212 | } |
213 | 213 | |
— | — | @@ -244,18 +244,12 @@ |
245 | 245 | $link_url .= $inQueryStr; |
246 | 246 | } |
247 | 247 | } |
248 | | - if ( $inLinkType == 'button' ) { |
249 | | - $str = |
250 | | - Html::rawElement( 'form', array( 'action' => $link_url, 'method' => 'get', 'class' => $classStr ), |
251 | | - Html::rawElement( 'button', array( 'type' => 'submit', 'value' => $inLinkStr ), $inLinkStr ) . |
252 | | - $hidden_inputs |
253 | | - ); |
254 | | - } elseif ( $inLinkType == 'post button' ) { |
255 | | - $str = |
256 | | - Html::rawElement( 'form', array( 'action' => $link_url, 'method' => 'post', 'class' => $classStr ), |
257 | | - Html::rawElement( 'button', array( 'type' => 'submit', 'value' => $inLinkStr ), $inLinkStr ) . |
258 | | - $hidden_inputs |
259 | | - ); |
| 248 | + if ( $inLinkType == 'button' || $inLinkType == 'post button' ) { |
| 249 | + $formMethod = ( $inLinkType == 'button' ) ? 'get' : 'post'; |
| 250 | + $str = Html::rawElement( 'form', array( 'action' => $link_url, 'method' => $formMethod, 'class' => $classStr ), |
| 251 | + Html::rawElement( 'button', array( 'type' => 'submit', 'value' => $inLinkStr ), $inLinkStr ) . |
| 252 | + $hidden_inputs |
| 253 | + ); |
260 | 254 | } else { |
261 | 255 | // If a target page has been specified but it doesn't |
262 | 256 | // exist, make it a red link. |