diff --git a/updateFeeds.js b/updateFeeds.js index c5565be..618a89d 100644 --- a/updateFeeds.js +++ b/updateFeeds.js @@ -70,7 +70,7 @@ return new Promise((resolve, reject) => { // FIX THIS item = transformContent(item); //console.log(item.urls); - let message = `
${item.content || ''}
`; + let message = `${item.content || ''}`; if (item.enclosure && item.enclosure.url && item.enclosure.url.includes('.mp3')) { message += ``; } @@ -146,8 +146,8 @@ function transformContent(item) { }); // couple of hacky regexes to make sure we clean up everything - item.content = $('body').html().replace(/^(\n|\r)/,'').replace(/>\r+,'><').replace(/ +/g, ''); - item.content = item.content.replace(/^(\n|\r)/,'').replace(/>\r+,'><').replace(/>\s*<').replace(/>\u200B+<').replace(/ +/g, '').replace(/<\/p>/g,''); + item.content = $('body').html().replace(/^(\n|\r)/g,'').replace(/>\r+<').replace(/ +/g, ''); + item.content = item.content.replace(/^(\n|\r)/g,'').replace(/>\r+<').replace(/>\s*<').replace(//g,'').replace(/>\u200B+<').replace(/ +/g, '').replace(/
<\/p>/g,'').replace(/(
)+/g,'
');
return item;
}