r61349 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r61348‎ | r61349 | r61350 >
Date:00:52, 22 January 2010
Author:yaron
Status:deferred
Tags:
Comment:
Fix for handling of special characters (especially double-quotes) in hidden free text field
Modified paths:
  • /trunk/extensions/SemanticForms/includes/SF_FormPrinter.inc (modified) (history)

Diff [purge]

Index: trunk/extensions/SemanticForms/includes/SF_FormPrinter.inc
@@ -1180,7 +1180,8 @@
11811181 //$free_text = Sanitizer::safeEncodeAttribute($free_text);
11821182 }
11831183 // now that we have it, substitute free text into the form and page
1184 - $form_text = str_replace('!free_text!', $free_text, $form_text);
 1184+ $escaped_free_text = Sanitizer::safeEncodeAttribute( $free_text );
 1185+ $form_text = str_replace('!free_text!', $escaped_free_text, $form_text);
11851186 $data_text = str_replace('!free_text!', $free_text, $data_text);
11861187
11871188 // add a warning in, if we're editing an existing page and that page

Status & tagging log