Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion netlify/functions/batchUpdateMeetingSummariesArray.js
Original file line number Diff line number Diff line change
Expand Up @@ -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)) {
Expand Down
8 changes: 7 additions & 1 deletion netlify/functions/batchUpdateMeetingSummariesById.js
Original file line number Diff line number Diff line change
Expand Up @@ -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)) {
Expand Down