--- atom.module	2008-08-10 16:00:50.000000000 +0000
+++ atom.module.new	2008-11-08 16:36:09.000000000 +0000
@@ -13,6 +13,7 @@
 
 define('ATOM_DISPLAY_SUMMARY', true);
 define('ATOM_DISPLAY_CONTENT', true);
+define('ATOM_CONTENT_TYPE',false);
 
 /**
  * Valid permissions for the atom module
@@ -246,21 +247,38 @@ function _atom_print_feed($nodes, $feed_
 
     if (variable_get('atom_display_summary', ATOM_DISPLAY_SUMMARY)) {
       // Summary
-      $output .= '    <summary type="html"><![CDATA[';
+      if (variable_get('atom_content_type', ATOM_CONTENT_TYPE)) {
+        $output .= '    <summary type="xhtml"><div xmlns="http://www.w3.org/1999/xhtml">';
+      } else {
+        $output .= '    <summary type="html"><![CDATA[';
+      }
       $output .= variable_get('atom_ad_location', 'off') == 'prepend' ? str_replace('%link', urlencode($link), str_replace('%id', $node->nid, variable_get('atom_ad_code', ''))) : '';
       $output .= check_markup($item->teaser, $item->format, FALSE);
       $output .= variable_get('atom_ad_location', 'off') == 'append' ? str_replace('%link', urlencode($link), str_replace('%id', $node->nid, variable_get('atom_ad_code', ''))) : '';
-      $output .= "    ]]></summary>\n";
+      if (variable_get('atom_content_type', ATOM_CONTENT_TYPE)) {
+        $output .= "    </div></summary>\n";
+      } else {
+         $output .= "    ]]></summary>\n";
+      }
     }
 
 
     if (variable_get('atom_display_content', ATOM_DISPLAY_CONTENT)) {
       // Body
-      $output .= '    <content type="html"><![CDATA[';
+
+      if (variable_get('atom_content_type', ATOM_CONTENT_TYPE)) {
+        $output .= '   <content type="xhtml"><div xmlns="http://www.w3.org/1999/xhtml">';
+      } else {
+         $output .= '    <content type="html"><![CDATA[';
+      }
       $output .= variable_get('atom_ad_location', 'off') == 'prepend' ? str_replace('%link', urlencode($link), str_replace('%id', $node->nid, variable_get('atom_ad_code', ''))) : '';
       $output .= check_markup($item->body, $item->format, FALSE);
       $output .= variable_get('atom_ad_location', 'off') == 'append' ? str_replace('%link', urlencode($link), str_replace('%id', $node->nid, variable_get('atom_ad_code', ''))) : '';
-      $output .= "    ]]></content>\n";
+      if (variable_get('atom_content_type', ATOM_CONTENT_TYPE)) {
+        $output .= "   </div></content>\n";
+      } else {
+        $output .= "    ]]></content>\n";
+      }
     }
     $output .= "  </entry>\n";
   }
@@ -336,6 +354,12 @@ function atom_admin_settings() {
     '#description' => t('aka the teaser'),
     '#default_value' => variable_get('atom_display_summary', ATOM_DISPLAY_SUMMARY)
   );
+  $form['atom_feed_options']['atom_content_type'] = array(
+      '#type' => 'checkbox',
+      '#title' => t('XHTML Content Type'),
+      '#description' => t('HTML Content type by default'),
+      '#default_value' => variable_get('atom_content_type', ATOM_CONTENT_TYPE)
+  );
   $form['atom_feed_options']['atom_display_content'] = array(
     '#type' => 'checkbox',
     '#title' => t('Output the content'),
