Skip to content

Commit

Permalink
Enable invalidCharReplacement instead of crashing
Browse files Browse the repository at this point in the history
Open to exposing this if people really need it.
  • Loading branch information
bcomnes committed May 9, 2024
1 parent 07a825c commit ac4e328
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,11 @@ const jsonfeedToRSSObject = require('./jsonfeed-to-rss-object')
*/
module.exports = function jsonfeedToRSS (jsonfeed, opts) {
const feedObj = jsonfeedToRSSObject(jsonfeed, opts)
const feed = builder.create(feedObj, { encoding: 'utf-8', skipNullAttributes: true, skipNullNodes: true })
const feed = builder.create(feedObj, {
encoding: 'utf-8',
skipNullAttributes: true,
skipNullNodes: true,
invalidCharReplacement: ''
})
return feed.end({ pretty: true, allowEmpty: false })
}

0 comments on commit ac4e328

Please sign in to comment.