Fix episode highlight save: preserve structured show-notes fields; v2.0.40
Publish Container / docker (push) Successful in 15m47s
Publish Container / docker (push) Successful in 15m47s
sanitizeFeaturedLinks was silently dropping showNotesSummary, showNotesThemes, showNotesScripture, showNotesQuotes, and showNotesResources on every save — only the legacy showNotes string was kept. Added sanitization for all five new fields and updated the keep-filter to include them. Also removed set -e from entrypoint.sh and made seed/merge steps non-fatal so a permissions error on the mounted data volume no longer crash-loops the container. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
1 parent
c79589b311
commit
600c450eff
3 files changed
+22
-8
No files matched your search
@@ -134,6 +134,11 @@ export function sanitizeFeaturedLinks(value) {
|
||||
.slice(0, 30)
|
||||
: []
|
||||
|
||||
const sanitizeStringArray = (val, limit) =>
|
||||
Array.isArray(val)
|
||||
? val.filter(s => typeof s === 'string').map(s => s.trim()).filter(Boolean).slice(0, limit)
|
||||
: []
|
||||
|
||||
return {
|
||||
id: typeof item.id === 'string' && item.id.trim() ? item.id.trim() : randomUUID(),
|
||||
title: typeof item.title === 'string' ? item.title.trim().slice(0, 140) : '',
|
||||
@@ -142,6 +147,11 @@ export function sanitizeFeaturedLinks(value) {
|
||||
url: sanitizeUrl(item.url),
|
||||
embedUrl: sanitizeUrl(item.embedUrl),
|
||||
showNotes: typeof item.showNotes === 'string' ? item.showNotes.trim().slice(0, 10000) : '',
|
||||
showNotesSummary: typeof item.showNotesSummary === 'string' ? item.showNotesSummary.trim().slice(0, 1000) : '',
|
||||
showNotesThemes: sanitizeStringArray(item.showNotesThemes, 20),
|
||||
showNotesScripture: sanitizeStringArray(item.showNotesScripture, 30),
|
||||
showNotesQuotes: sanitizeStringArray(item.showNotesQuotes, 20),
|
||||
showNotesResources: sanitizeStringArray(item.showNotesResources, 30),
|
||||
discussionQuestions,
|
||||
}
|
||||
})
|
||||
@@ -152,6 +162,11 @@ export function sanitizeFeaturedLinks(value) {
|
||||
item.url ||
|
||||
item.embedUrl ||
|
||||
item.showNotes ||
|
||||
item.showNotesSummary ||
|
||||
item.showNotesThemes.length > 0 ||
|
||||
item.showNotesScripture.length > 0 ||
|
||||
item.showNotesQuotes.length > 0 ||
|
||||
item.showNotesResources.length > 0 ||
|
||||
item.discussionQuestions.length > 0,
|
||||
)
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user