Add:Full podcast episode description parsed and viewable in modal #492

This commit is contained in:
advplyr 2022-05-28 11:38:51 -05:00
parent c4bfa266b0
commit a394f38fe9
9 changed files with 150 additions and 10 deletions

View file

@ -81,9 +81,16 @@ function extractEpisodeData(item) {
}
}
// Full description with html
if (item['content:encoded']) {
const rawDescription = (extractFirstArrayItem(item, 'content:encoded') || '').trim()
episode.description = htmlSanitizer.sanitize(rawDescription)
}
// Supposed to be the plaintext description but not always followed
if (item['description']) {
const rawDescription = extractFirstArrayItem(item, 'description') || ''
episode.description = htmlSanitizer.sanitize(rawDescription)
if (!episode.description) episode.description = htmlSanitizer.sanitize(rawDescription)
episode.descriptionPlain = htmlSanitizer.stripAllTags(rawDescription)
}