Fix slicing itunes:subtitle

This commit is contained in:
Arkadiusz Wieczorek 2022-07-18 10:25:09 +02:00
parent d76fb72f6e
commit 7fc974e744

View File

@ -47,8 +47,9 @@ app.use(async (ctx) => {
item["guid"][0].$.isPermaLink = item["guid"][0].$.isPermalink;
delete item["guid"][0].$.isPermalink;
item["itunes:subtitle"][0] =
item["itunes:subtitle"][0].slice(0, -3) + "…";
item["itunes:subtitle"][0].length < 255
? item["itunes:subtitle"][0]
: item["itunes:subtitle"][0].slice(0, 255) + "…";
item["itunes:summary"][0] = item["itunes:summary"][0].replace(
/(<([^>]+)>)/gi,
""