Index: trunk/extensions/SemanticForms/specials/SF_FormEdit.php |
— | — | @@ -75,13 +75,9 @@ |
76 | 76 | $form_definition = $form_article->getContent(); |
77 | 77 | $form_definition = StringUtils::delimiterReplace( '<noinclude>', '</noinclude>', '', $form_definition ); |
78 | 78 | $matches; |
79 | | - if ( preg_match( '/{{{info.*page name\s*=\s*([^\|]*)/m', $form_definition, $matches ) ) { |
80 | | - $page_name_formula = str_replace( '_', ' ', $matches[1] ); |
81 | | - // if the tag close ('}}}') is in here, chop off |
82 | | - // that and everything after it |
83 | | - if ( $pos = strpos( $page_name_formula, '}}}' ) ) { |
84 | | - $page_name_formula = substr( $page_name_formula, 0, $pos ); |
85 | | - } |
| 79 | + if ( preg_match( '/{{{info.*page name\s*=\s*(.*)}}}/m', $form_definition, $matches ) ) { |
| 80 | + $page_name_elements = SFUtils::getFormTagComponents( $matches[1] ); |
| 81 | + $page_name_formula = $page_name_elements[0]; |
86 | 82 | } elseif ( count( $alt_forms ) == 0 ) { |
87 | 83 | $wgOut->addHTML( Xml::element( 'p', array( 'class' => 'error' ), wfMsg( 'sf_formedit_badurl' ) ) ); |
88 | 84 | return; |