=== modified file 'modules/blogapi/blogapi.module'
--- modules/blogapi/blogapi.module	2008-12-30 18:27:36 +0000
+++ modules/blogapi/blogapi.module	2010-08-05 16:43:46 +0000
@@ -198,7 +198,7 @@
   $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
@@ -610,14 +610,16 @@
 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));
 
+  if (!$format) {
+    $format = filter_formats(FILTER_FORMAT_DEFAULT);
+  }
+  
   $filters = array();
-  foreach ($formats as $format) {
-    $filter['key'] = $format->format;
-    $filter['label'] = $format->name;
-    $filters[] = $filter;
-  }
+  $filter['key'] = $format->format;
+  $filter['label'] = $format->name;
+  $filters[] = $filter;
 
   return $filters;
 }
@@ -711,6 +713,21 @@
     '#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);
   $blogapi_usersize_default = variable_get('blogapi_usersize_default', 1);
@@ -876,9 +893,10 @@
   }
 
   // mt_convert_breaks
-  if ($struct['mt_convert_breaks']) {
-    $node->format = $struct['mt_convert_breaks'];
-  }
+  // Ignore non-choice of input filter
+  //if ($struct['mt_convert_breaks']) {
+  //  $node->format = $struct['mt_convert_breaks'];
+  //}
 
   // dateCreated
   if ($struct['dateCreated']) {

