MCPcopy Index your code
hub / github.com/adobe/react-spectrum / sanitizeExcelString

Function sanitizeExcelString

scripts/createExcelSheet.mjs:5–10  ·  view source on GitHub ↗
(value)

Source from the content-addressed store, hash-verified

3// Prevent formula injection: strings starting with =, +, -, @, tab, or CR are
4// formula triggers in spreadsheet software. Prefix with a space to neutralize.
5function sanitizeExcelString(value) {
6 if (typeof value === 'string' && /^[=+\-@\t\r]/.test(value)) {
7 return ' ' + value;
8 }
9 return value;
10}
11
12const BUGS_NOTES_HEADER = [
13 'Component',

Callers 2

buildReleaseNotesSheetFunction · 0.85
buildPassFailSheetFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected