diff --git a/lib/index.js b/lib/index.js index 2ad40a4..0b1a9f4 100755 --- a/lib/index.js +++ b/lib/index.js @@ -64,6 +64,7 @@ function generateXML (data){ var item_values = [ { title: { _cdata: item.title } } ]; + ifTruePush(item._attr, item_values, { _attr: item._attr }); ifTruePush(item.description, item_values, { description: { _cdata: item.description } }); ifTruePush(item.url, item_values, { link: item.url }); ifTruePush(item.link || item.guid || item.title, item_values, { guid: [ { _attr: { isPermaLink: !item.guid && !!item.url } }, item.guid || item.url || item.title ] }); @@ -163,6 +164,7 @@ function RSS (options, items) { this.item = function (options) { options = options || {}; var item = { + _attr: options._attr, title: options.title || 'No title', description: options.description || '', url: options.url,