Index: modules/node/node.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/node/node.module,v
retrieving revision 1.1139
diff -u -p -r1.1139 node.module
--- modules/node/node.module	5 Oct 2009 01:18:25 -0000	1.1139
+++ modules/node/node.module	6 Oct 2009 05:22:14 -0000
@@ -1834,7 +1834,9 @@ function node_block_view($delta = '') {
  *   generated with passing an empty array, if no items are to be added
  *   to the feed.
  * @param $channel
- *   An associative array containing title, link, description and other keys.
+ *   An associative array containing title, link, description and other keys,
+ *   to be parsed by format_rss_channel() and format_xml_elements().
+ *   A list of channel elements can be found at the @link http://cyber.law.harvard.edu/rss/rss.html RSS 2.0 Specification. @endlink
  *   The link should be an absolute URL.
  */
 function node_feed($nids = FALSE, $channel = array()) {
@@ -1894,11 +1896,12 @@ function node_feed($nids = FALSE, $chann
     'description' => variable_get('feed_description', ''),
     'language'    => $language->language
   );
+  $channel_extras = array_diff_key($channel, $channel_defaults);
   $channel = array_merge($channel_defaults, $channel);
 
   $output = "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n";
   $output .= "<rss version=\"" . $channel["version"] . "\" xml:base=\"" . $base_url . "\" " . drupal_attributes($namespaces) . ">\n";
-  $output .= format_rss_channel($channel['title'], $channel['link'], $channel['description'], $items, $channel['language']);
+  $output .= format_rss_channel($channel['title'], $channel['link'], $channel['description'], $items, $channel['language'], $channel_extras);
   $output .= "</rss>\n";
 
   drupal_add_http_header('Content-Type', 'application/rss+xml; charset=utf-8');
Index: modules/node/node.test
===================================================================
RCS file: /cvs/drupal/drupal/modules/node/node.test,v
retrieving revision 1.46
diff -u -p -r1.46 node.test
--- modules/node/node.test	2 Oct 2009 14:39:43 -0000	1.46
+++ modules/node/node.test	6 Oct 2009 05:22:14 -0000
@@ -990,3 +990,27 @@ class NodeAdminTestCase extends DrupalWe
     $this->assertNoText($node3->title, t('Page node does not appear on the node administration listing.'));
   }
 }
+
+/**
+ * Test the node_feed() functionality
+ */
+class NodeFeedTestCase extends DrupalWebTestCase {
+  public static function getInfo() {
+    return array(
+      'name' => 'Node feed',
+      'description' => 'Ensures that node_feed() functions correctly.',
+      'group' => 'Node',
+   );
+  }
+
+  /**
+   * Ensure that node_feed accepts and prints extra channel elements.
+   */
+  function testNodeFeedExtraChannelElements() {
+    ob_start();
+    node_feed(array(), array('copyright' => 'Drupal is a registered trademark of Dries Buytaert.'));
+    $output = ob_get_clean();
+
+    $this->assertTrue(strpos($output, '<copyright>Drupal is a registered trademark of Dries Buytaert.</copyright>') !== FALSE);
+  }
+}
