--- blogapi.module	2010-01-16 00:02:21.000000000 +0100
+++ blogapi.module	2010-11-12 14:51:45.000000000 +0100
@@ -244,7 +244,7 @@ function blogapi_blogger_new_post($appke
   $edit['promote'] = in_array('promote', $node_type_default);
   $edit['comment'] = variable_get('comment_' . $edit['type'], 2);
   $edit['revision'] = in_array('revision', $node_type_default);
-  $edit['format'] = FILTER_FORMAT_DEFAULT;
+  $edit['format'] = (filter_access(variable_get('blogapi_default_format', FILTER_FORMAT_DEFAULT)) ? variable_get('blogapi_default_format', FILTER_FORMAT_DEFAULT) :  FILTER_FORMAT_DEFAULT);
   $edit['status'] = $publish;
 
   // Check for bloggerAPI vs. metaWeblogAPI.
@@ -670,15 +670,17 @@ function blogapi_mt_validate_terms($node
 function blogapi_mt_supported_text_filters() {
   // NOTE: we're only using anonymous' formats because the MT spec
   // does not allow for per-user formats.
-  $formats = filter_formats();
+  $format = filter_formats(variable_get('blogapi_default_format', FILTER_FORMAT_DEFAULT));
 
-  $filters = array();
-  foreach ($formats as $format) {
-    $filter['key'] = $format->format;
-    $filter['label'] = $format->name;
-    $filters[] = $filter;
+  if (!$format) {
+    $format = filter_formats(FILTER_FORMAT_DEFAULT);
   }
 
+  $filters = array();
+  $filter['key'] = $format->format;
+  $filter['label'] = $format->name;
+  $filters[] = $filter;
+
   return $filters;
 }
 
@@ -778,6 +780,21 @@ function blogapi_admin_settings() {
     '#options' => $node_types,
     '#description' => t('Select the content types available to external blogging clients via Blog API. If supported, each enabled content type will be displayed as a separate "blog" by the external client.')
   );
+  
+   $formats = filter_formats();
+   $format_list = array();
+   foreach ($formats as $f) {
+     $format_list[$f->format] = $f->name;
+   }
+ 
+   $form['blogapi_default_format'] = array(
+     '#type' => 'select',
+     '#title' => t('Choose the input format for remote posts'),
+     '#required' => TRUE,
+     '#default_value' => variable_get('blogapi_default_format', FILTER_FORMAT_DEFAULT),
+     '#options' => $format_list,
+     '#description' => t('The user posting must have permissions for this format, otherwise the standard (anonymous) format is used.')
+   );
 
   $blogapi_extensions_default = variable_get('blogapi_extensions_default', 'jpg jpeg gif png txt doc xls pdf ppt pps odt ods odp');
   $blogapi_uploadsize_default = variable_get('blogapi_uploadsize_default', 1);
@@ -954,9 +971,11 @@ function _blogapi_mt_extra(&$node, $stru
     $node->body[FIELD_LANGUAGE_NONE][0]['value'] = $node->body[FIELD_LANGUAGE_NONE][0]['value'] . '<!--extended-->' . $struct['mt_text_more'];
   }
 
-  if ($struct['mt_convert_breaks']) {
-    $node->body[FIELD_LANGUAGE_NONE][0]['format'] = $struct['mt_convert_breaks'];
-  }
+
+  // Ignore non-choice of input filter
+  //if ($struct['mt_convert_breaks']) {
+  //  $node->body[FIELD_LANGUAGE_NONE][0]['format'] = $struct['mt_convert_breaks'];
+  //}
 
   if ($struct['dateCreated']) {
     $node->date = format_date(mktime($struct['dateCreated']->hour, $struct['dateCreated']->minute, $struct['dateCreated']->second, $struct['dateCreated']->month, $struct['dateCreated']->day, $struct['dateCreated']->year), 'custom', 'Y-m-d H:i:s O');
