fix(installer): remove double-escaping of quotes in CSV manifest pipeline

cleanForCSV() pre-escaped " to "" before storing in memory, then
escapeCsv() escaped again at CSV write time. After csv-parse round-trip
(which only un-escapes once), descriptions retained doubled quotes
instead of originals, corrupting generated output files.

Fix: remove the redundant quote escaping from cleanForCSV() since
escapeCsv() already handles CSV quoting correctly at write time.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
pbean 2026-02-23 19:49:55 -08:00
parent b83ccc71b9
commit f09dcd4806
1 changed files with 4 additions and 6 deletions

View File

@ -24,16 +24,14 @@ class ManifestGenerator {
} }
/** /**
* Clean text for CSV output by normalizing whitespace and escaping quotes * Clean text for CSV output by normalizing whitespace.
* Note: Quote escaping is handled by escapeCsv() at write time.
* @param {string} text - Text to clean * @param {string} text - Text to clean
* @returns {string} Cleaned text safe for CSV * @returns {string} Cleaned text
*/ */
cleanForCSV(text) { cleanForCSV(text) {
if (!text) return ''; if (!text) return '';
return text return text.trim().replaceAll(/\s+/g, ' '); // Normalize all whitespace (including newlines) to single space
.trim()
.replaceAll(/\s+/g, ' ') // Normalize all whitespace (including newlines) to single space
.replaceAll('"', '""'); // Escape quotes for CSV
} }
/** /**