https://www.mediawiki.org/wiki/Special:Code/MediaWiki/114586
Revision: 114586 Author: yaron Date: 2012-03-28 22:40:57 +0000 (Wed, 28 Mar 2012) Log Message: ----------- Fixed the preserving of "unhandled" fields, for templates whose name contains a space. Modified Paths: -------------- trunk/extensions/SemanticForms/includes/SF_FormUtils.php Modified: trunk/extensions/SemanticForms/includes/SF_FormUtils.php =================================================================== --- trunk/extensions/SemanticForms/includes/SF_FormUtils.php 2012-03-28 22:33:37 UTC (rev 114585) +++ trunk/extensions/SemanticForms/includes/SF_FormUtils.php 2012-03-28 22:40:57 UTC (rev 114586) @@ -46,6 +46,8 @@ * not handled by the form itself */ static function unhandledFieldsHTML( $templateName, $templateContents ) { + // HTML element names shouldn't contain spaces + $templateName = str_replace( ' ', '_', $templateName ); $text = ""; foreach ( $templateContents as $key => $value ) { if ( !is_null( $key ) && !is_numeric( $key ) ) { @@ -63,6 +65,7 @@ static function addUnhandledFields( $templateName ) { global $wgRequest; + $templateName = str_replace( ' ', '_', $templateName ); $prefix = '_unhandled_' . $templateName . '_'; $prefixSize = strlen( $prefix ); $additional_template_text = ""; _______________________________________________ MediaWiki-CVS mailing list MediaWiki-CVS@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs