Index: trunk/extensions/SemanticForms/includes/SF_FormPrinter.php |
— | — | @@ -367,10 +367,15 @@ |
368 | 368 | } |
369 | 369 | // Otherwise, parse it. |
370 | 370 | if ( ! $got_form_def_from_cache ) { |
371 | | - $form_def = $wgParser->parse( $form_def, $this->mPageTitle, $wgParser->mOptions )->getText(); |
| 371 | + if ( $embedded) { |
| 372 | + $form_def = $wgParser->recursiveTagParse( $form_def ); |
| 373 | + $form_def = $wgParser->mStripState->unstripBoth( $form_def ); |
| 374 | + } else { |
| 375 | + $form_def = $wgParser->parse( $form_def, $this->mPageTitle, $wgParser->mOptions )->getText(); |
| 376 | + } |
372 | 377 | } |
373 | 378 | |
374 | | - // turn form definition file into an array of sections, one for each |
| 379 | + // Turn form definition file into an array of sections, one for each |
375 | 380 | // template definition (plus the first section) |
376 | 381 | $form_def_sections = array(); |
377 | 382 | $start_position = 0; |
— | — | @@ -393,7 +398,7 @@ |
394 | 399 | $tag_components = SFUtils::getFormTagComponents( $bracketed_string ); |
395 | 400 | $tag_title = trim( $tag_components[0] ); |
396 | 401 | if ( $tag_title == 'for template' || $tag_title == 'end template' ) { |
397 | | - // create a section for everything up to here |
| 402 | + // Create a section for everything up to here |
398 | 403 | $section = substr( $form_def, $section_start, $brackets_loc - $section_start ); |
399 | 404 | $form_def_sections[] = $section; |
400 | 405 | $section_start = $brackets_loc; |
— | — | @@ -402,9 +407,9 @@ |
403 | 408 | } // end while |
404 | 409 | $form_def_sections[] = trim( substr( $form_def, $section_start ) ); |
405 | 410 | |
406 | | - // cycle through form definition file (and possibly an existing article |
| 411 | + // Cycle through form definition file (and possibly an existing article |
407 | 412 | // as well), finding template and field declarations and replacing them |
408 | | - // with form elements, either blank or pre-populated, as appropriate |
| 413 | + // with form elements, either blank or pre-populated, as appropriate. |
409 | 414 | $all_fields = array(); |
410 | 415 | $data_text = ""; |
411 | 416 | $template_name = ""; |