diff --git a/index.ts b/index.ts index f2d1c17..513c7a2 100644 --- a/index.ts +++ b/index.ts @@ -13,7 +13,7 @@ app.use(async (ctx) => { const { data } = await Axios.get( "https://podcast.midline.pl/api/v1/channels/Midline/rss" ); - const builder = new xml2js.Builder(); + const builder = new xml2js.Builder({ cdata: true }); const parsed_data = await xml2js.parseStringPromise(data); parsed_data.rss.channel[0]["itunes:explicit"] = "false"; @@ -58,10 +58,7 @@ app.use(async (ctx) => { delete item["guid"][0].$.isPermalink; item["itunes:subtitle"][0] = trim(item["itunes:subtitle"][0], 255); item["itunes:explicit"][0] = "false"; - item["itunes:summary"][0] = item["itunes:summary"][0].replace( - /(<([^>]+)>)/gi, - "" - ); + item["itunes:summary"][0] = item["itunes:summary"][0]; if (item["title"][0].match(/#[0-9]*/)[0].substring(1) !== "0") { try { last_index = item["title"][0]