diff --git a/lib/index.js b/lib/index.js index e9fa9ce..07ed334 100755 --- a/lib/index.js +++ b/lib/index.js @@ -181,7 +181,7 @@ function RSS (options, items) { }; this.xml = function(indent) { - return '\n' + + return '' + xml(generateXML(this), indent); }; } diff --git a/test/expectedOutput/customElements.xml b/test/expectedOutput/customElements.xml index fa3d1aa..fed80ae 100644 --- a/test/expectedOutput/customElements.xml +++ b/test/expectedOutput/customElements.xml @@ -1,5 +1,4 @@ - - + <![CDATA[title]]> diff --git a/test/expectedOutput/customNamespaces.xml b/test/expectedOutput/customNamespaces.xml index fc3684d..7fe75b6 100644 --- a/test/expectedOutput/customNamespaces.xml +++ b/test/expectedOutput/customNamespaces.xml @@ -1,5 +1,4 @@ - - + <![CDATA[title]]> diff --git a/test/expectedOutput/default.xml b/test/expectedOutput/default.xml index 3f2ba69..f3cec4b 100644 --- a/test/expectedOutput/default.xml +++ b/test/expectedOutput/default.xml @@ -1,2 +1 @@ - -<![CDATA[Untitled RSS Feed]]>http://github.com/dylang/node-rssRSS for NodeWed, 10 Dec 2014 19:04:57 GMT \ No newline at end of file +<![CDATA[Untitled RSS Feed]]>http://github.com/dylang/node-rssRSS for NodeWed, 10 Dec 2014 19:04:57 GMT \ No newline at end of file diff --git a/test/expectedOutput/defaultOneItem.xml b/test/expectedOutput/defaultOneItem.xml index 422e49f..bd3ffdc 100644 --- a/test/expectedOutput/defaultOneItem.xml +++ b/test/expectedOutput/defaultOneItem.xml @@ -1,2 +1 @@ - -<![CDATA[Untitled RSS Feed]]>http://github.com/dylang/node-rssRSS for NodeWed, 10 Dec 2014 19:04:57 GMT<![CDATA[No title]]>No title \ No newline at end of file +<![CDATA[Untitled RSS Feed]]>http://github.com/dylang/node-rssRSS for NodeWed, 10 Dec 2014 19:04:57 GMT<![CDATA[No title]]>No title \ No newline at end of file diff --git a/test/expectedOutput/enclosures.xml b/test/expectedOutput/enclosures.xml index de9d6d2..be32a38 100644 --- a/test/expectedOutput/enclosures.xml +++ b/test/expectedOutput/enclosures.xml @@ -1,5 +1,4 @@ - - + <![CDATA[title]]> diff --git a/test/expectedOutput/latLong.xml b/test/expectedOutput/latLong.xml index 5c1d827..7183953 100644 --- a/test/expectedOutput/latLong.xml +++ b/test/expectedOutput/latLong.xml @@ -1,5 +1,4 @@ - - + <![CDATA[title]]> diff --git a/test/expectedOutput/pubSubHubbub.xml b/test/expectedOutput/pubSubHubbub.xml index 185c64d..dafc2a1 100644 --- a/test/expectedOutput/pubSubHubbub.xml +++ b/test/expectedOutput/pubSubHubbub.xml @@ -1,5 +1,4 @@ - - + <![CDATA[title]]> diff --git a/test/expectedOutput/simpleFeed.xml b/test/expectedOutput/simpleFeed.xml index a63efad..7db75e8 100644 --- a/test/expectedOutput/simpleFeed.xml +++ b/test/expectedOutput/simpleFeed.xml @@ -1,2 +1 @@ - -<![CDATA[title]]>http://example.comhttp://example.com/icon.pngtitlehttp://example.comExample GeneratorWed, 10 Dec 2014 19:04:57 GMTSun, 20 May 2012 04:00:00 GMThttp://example.com/rss/docs.html60<![CDATA[item 1]]>http://example.com/article1http://example.com/article1Thu, 24 May 2012 04:00:00 GMT<![CDATA[item 2]]>http://example.com/article2http://example.com/article2Fri, 25 May 2012 04:00:00 GMT<![CDATA[item 3]]>http://example.com/article3item3Sat, 26 May 2012 04:00:00 GMT<![CDATA[item 4 & html test with <strong>]]>html]]>http://example.com/article4?this&thathttp://example.com/article4?this&thatSun, 27 May 2012 04:00:00 GMT<![CDATA[item 5 & test for categories]]>http://example.com/article5http://example.com/article5Mon, 28 May 2012 04:00:00 GMT \ No newline at end of file +<![CDATA[title]]>http://example.comhttp://example.com/icon.pngtitlehttp://example.comExample GeneratorWed, 10 Dec 2014 19:04:57 GMTSun, 20 May 2012 04:00:00 GMThttp://example.com/rss/docs.html60<![CDATA[item 1]]>http://example.com/article1http://example.com/article1Thu, 24 May 2012 04:00:00 GMT<![CDATA[item 2]]>http://example.com/article2http://example.com/article2Fri, 25 May 2012 04:00:00 GMT<![CDATA[item 3]]>http://example.com/article3item3Sat, 26 May 2012 04:00:00 GMT<![CDATA[item 4 & html test with <strong>]]>html]]>http://example.com/article4?this&thathttp://example.com/article4?this&thatSun, 27 May 2012 04:00:00 GMT<![CDATA[item 5 & test for categories]]>http://example.com/article5http://example.com/article5Mon, 28 May 2012 04:00:00 GMT \ No newline at end of file diff --git a/test/expectedOutput/simpleFeedFormated.xml b/test/expectedOutput/simpleFeedFormated.xml index aa5df69..b788381 100644 --- a/test/expectedOutput/simpleFeedFormated.xml +++ b/test/expectedOutput/simpleFeedFormated.xml @@ -1,5 +1,4 @@ - - + <![CDATA[title]]>