mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2026-03-20 06:49:46 +00:00
Update podcast episode update endpoint to sanitize subtitle
Some checks failed
CodeQL / Analyze (push) Has been cancelled
Run Component Tests / Run Component Tests (push) Has been cancelled
Build and Push Docker Image / build (push) Has been cancelled
Integration Test / build and test (push) Has been cancelled
Run Unit Tests / Run Unit Tests (push) Has been cancelled
Some checks failed
CodeQL / Analyze (push) Has been cancelled
Run Component Tests / Run Component Tests (push) Has been cancelled
Build and Push Docker Image / build (push) Has been cancelled
Integration Test / build and test (push) Has been cancelled
Run Unit Tests / Run Unit Tests (push) Has been cancelled
This commit is contained in:
parent
7c0d9efe91
commit
4bdd76d94c
1 changed files with 6 additions and 0 deletions
|
|
@ -412,6 +412,12 @@ class PodcastController {
|
|||
Logger.debug(`[PodcastController] Sanitized description from "${req.body[key]}" to "${sanitizedDescription}"`)
|
||||
req.body[key] = sanitizedDescription
|
||||
}
|
||||
} else if (key === 'subtitle' && req.body[key]) {
|
||||
const sanitizedSubtitle = htmlSanitizer.sanitize(req.body[key])
|
||||
if (sanitizedSubtitle !== req.body[key]) {
|
||||
Logger.debug(`[PodcastController] Sanitized subtitle from "${req.body[key]}" to "${sanitizedSubtitle}"`)
|
||||
req.body[key] = sanitizedSubtitle
|
||||
}
|
||||
}
|
||||
|
||||
updatePayload[key] = req.body[key]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue