Index: forward.module
===================================================================
--- forward.module	(revision 56)
+++ forward.module	(working copy)
@@ -164,7 +164,20 @@
     '#rows' => 10,
     '#description' => t('This message will be displayed after the user successfully submits the form.'),
   );
-
+  
+  // Forward text filtering input format
+  // added by Matt Connolly
+  $form['forward_text_format'] = filter_form( variable_get( 'forward_text_format', FILTER_FORMAT_DEFAULT ) );
+  $form['forward_text_format']['#title'] = t('Forward text input format');
+  $form['forward_text_format']['#collapsed'] = false;
+  // customise the '#parents' values so this value will actually get stored in the variable 'forward_text_format'
+  // like we want
+  foreach ($form['forward_text_format'] as $index => $field) {
+  	if (is_numeric($index) && is_array($field) && isset($field['#parents'])) {
+      $form['forward_text_format'][$index]['#parents'] = array('forward_text_format');
+  	}
+  }
+  
   // Forward Form Default Values
   $form['forward_page_defaults'] = array(
     '#type' => 'fieldset',
@@ -528,7 +541,8 @@
     'site_name' => variable_get('site_name', 'Drupal'),
     'yemail' => $form_state['values']['yemail'],
     'forward_message' => t(variable_get('forward_'. $emailtype .'message', '!name thought you would like to see the !site web site.'), array('!name' => l($form_state['values']['yname'], 'mailto:'. $form_state['values']['yemail'], array('absolute' => true)), '!site' => variable_get('site_name', 'drupal'))),
-    'message' => nl2br(check_plain($form_state['values']['message'])),
+    // added by Matt Connolly to apply a filter here that can be specified.
+    'message' => check_markup( $form_state['values']['message'], variable_get('forward_text_format', FILTER_FORMAT_DEFAULT ) ),
     'base_url' => $base_url,
     'content' => $content,
     'dynamic_content' => $dynamic_content,
@@ -1056,4 +1070,4 @@
 
 function _forward_column_width($column, $width = 35) {
   return (strlen($column) > $width ? substr($column, 0, $width) .'...' : $column);
-}
\ No newline at end of file
+}
