Index: plugins/views_plugin_style_rss.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/views/plugins/views_plugin_style_rss.inc,v
retrieving revision 1.1
diff -u -p -r1.1 views_plugin_style_rss.inc
--- plugins/views_plugin_style_rss.inc	3 Sep 2008 19:21:30 -0000	1.1
+++ plugins/views_plugin_style_rss.inc	24 Nov 2008 20:48:25 -0000
@@ -65,6 +65,16 @@ class views_plugin_style_rss extends vie
     );
   }
 
+  /**
+   * Return an array of additional XHTML elements to add to the channel.
+   *
+   * @return
+   *   An array that can be passed to format_xml_elements().
+   */
+  function get_channel_elements() {
+    return array();
+  }
+
   function render() {
     if (empty($this->row_plugin)) {
       vpr('views_plugin_style_default: Missing row plugin');
@@ -72,14 +82,25 @@ class views_plugin_style_rss extends vie
     }
     $rows = '';
 
+
     // This will be filled in by the row plugin and is used later on in the
     // theming output.
     $this->namespaces = array();
 
+    // Fetch any additional elements for the channel and merge in their
+    // namespaces.
+    $this->channel_elements = $this->get_channel_elements();
+    foreach ($this->channel_elements as $element) {
+      if (isset($element['namespace'])) {
+        $this->namespaces = array_merge($this->namespaces, $element['namespace']);
+      }
+    }
+
     foreach ($this->view->result as $row) {
       $rows .= $this->row_plugin->render($row);
     }
 
+
     return theme($this->theme_functions(), $this->view, $this->options, $rows);
   }
 }
Index: theme/theme.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/views/theme/theme.inc,v
retrieving revision 1.63
diff -u -p -r1.63 theme.inc
--- theme/theme.inc	28 Oct 2008 17:46:14 -0000	1.63
+++ theme/theme.inc	24 Nov 2008 20:48:27 -0000
@@ -451,6 +451,10 @@ function template_preprocess_views_view_
   else {
     $description = $options['description'];
   }
+  // The RSS 2.0 "spec" doesn't indicate HTML can be used in the description.
+  // We strip all HTML tags, but need to prevent double encoding from properly
+  // escaped source data (such as &amp becoming &amp;amp;).
+  $vars['description'] = check_plain(decode_entities(strip_tags($description)));
 
   if ($view->display_handler->get_option('sitename_title')) {
     $title = variable_get('site_name', 'Drupal');
@@ -461,6 +465,7 @@ function template_preprocess_views_view_
   else {
     $title = $view->get_title();
   }
+  $vars['title'] = check_plain($title);
 
   // Figure out which display which has a path we're using for this feed. If there isn't
   // one, use the global $base_url
@@ -484,8 +489,10 @@ function template_preprocess_views_view_
     $vars['link'] = check_url(url($path, $url_options));
   }
 
+  $vars['langcode'] = check_plain($language->language);
   $vars['namespaces'] = drupal_attributes($style->namespaces);
-  $vars['channel'] = format_rss_channel($title, $vars['link'], $description, $items, $language->language);
+  $vars['items'] = $items;
+  $vars['channel_elements'] = format_xml_elements($style->channel_elements);
 
   drupal_set_header('Content-Type: application/rss+xml; charset=utf-8');
 }
Index: theme/views-view-rss.tpl.php
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/views/theme/views-view-rss.tpl.php,v
retrieving revision 1.2
diff -u -p -r1.2 views-view-rss.tpl.php
--- theme/views-view-rss.tpl.php	21 Jul 2008 20:56:49 -0000	1.2
+++ theme/views-view-rss.tpl.php	24 Nov 2008 20:48:28 -0000
@@ -9,5 +9,12 @@
 ?>
 <?php print "<?xml"; ?> version="1.0" encoding="utf-8" <?php print "?>"; ?>
 <rss version="2.0" xml:base="<?php print $link; ?>"<?php print $namespaces; ?>>
-  <?php print $channel; ?>
+  <channel>
+    <title><?php print $title; ?></title>
+    <link><?php print $link; ?></link>
+    <description><?php print $description; ?></description>
+    <language><?php print $langcode; ?></language>
+    <?php print $channel_elements; ?>
+    <?php print $items; ?>
+  </channel>
 </rss>
\ No newline at end of file
