r78633 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r78632‎ | r78633 | r78634 >
Date:19:58, 20 December 2010
Author:yaron
Status:deferred
Tags:
Comment:
Fix for curly brackets placed into input fields in partial forms
Modified paths:
  • /trunk/extensions/SemanticForms/includes/SF_FormPrinter.php (modified) (history)

Diff [purge]

Index: trunk/extensions/SemanticForms/includes/SF_FormPrinter.php
@@ -1163,7 +1163,9 @@
11641164 $form_text .= SFFormUtils::hiddenFieldHTML( 'partial', 1 );
11651165 } else {
11661166 $free_text = null;
1167 - $existing_page_content = preg_replace( '/�\{(.*?)\}�/s', '{{\1}}', $existing_page_content );
 1167+ $existing_page_content = preg_replace( array( '/�\{/m','/\}�/m' ),
 1168+ array( '{{','}}' ),
 1169+ $existing_page_content );
11681170 $existing_page_content = preg_replace( '/\{\{\{insertionpoint\}\}\}/', '', $existing_page_content );
11691171 }
11701172 } elseif ( $source_is_page ) {

Status & tagging log