diff --git a/netlify/functions/batchUpdateMeetingSummariesArray.js b/netlify/functions/batchUpdateMeetingSummariesArray.js index 8fb9479..8bdb256 100644 --- a/netlify/functions/batchUpdateMeetingSummariesArray.js +++ b/netlify/functions/batchUpdateMeetingSummariesArray.js @@ -8,7 +8,13 @@ const MAX_CONCURRENT_REQUESTS = 10; function sanitizeObject(item) { if (typeof item === 'string') { // Only replace en dash (U+2013) or em dash (U+2014) with ASCII hyphen '-' - return item.replace(/[\u2013\u2014]/g, '-'); + // Replace curly single quotes ’ and ‘ with straight ASCII apostrophe ' + // Replace curly double quotes ” and “ with straight ASCII quote " + return item + .replace(/[\u2013\u2014]/g, '-') + .replace(/[\u2018\u2019]/g, "'") + .replace(/[\u201C\u201D]/g, '"') + .trim(); } if (Array.isArray(item)) { diff --git a/netlify/functions/batchUpdateMeetingSummariesById.js b/netlify/functions/batchUpdateMeetingSummariesById.js index 40330a5..eed498d 100644 --- a/netlify/functions/batchUpdateMeetingSummariesById.js +++ b/netlify/functions/batchUpdateMeetingSummariesById.js @@ -8,7 +8,13 @@ const MAX_CONCURRENT_REQUESTS = 10; function sanitizeObject(item) { if (typeof item === 'string') { // Only replace en dash (U+2013) or em dash (U+2014) with ASCII hyphen '-' - return item.replace(/[\u2013\u2014]/g, '-'); + // Replace curly single quotes ’ and ‘ with straight ASCII apostrophe ' + // Replace curly double quotes ” and “ with straight ASCII quote " + return item + .replace(/[\u2013\u2014]/g, '-') + .replace(/[\u2018\u2019]/g, "'") + .replace(/[\u201C\u201D]/g, '"') + .trim(); } if (Array.isArray(item)) {