I'm wondering if its worth adding sanisation all inputs for the feed.
import { Feed } from 'feed';
export const feed = new Feed({
// ...
});
const posts = [
{
// ...
title: 'Foo & Bar',
}
]
posts.forEach(({ title, ...rest }) => {
feed.addItem({
title,
...rest,
});
});
feed.rss2()
I believe the ampersand in the title will cause problems. Please let me know if I'm missing something here or we leave it up to the user to sanitise the title in this case.
Thanks in advance.
I'm wondering if its worth adding sanisation all inputs for the feed.
I believe the ampersand in the title will cause problems. Please let me know if I'm missing something here or we leave it up to the user to sanitise the title in this case.
Thanks in advance.