Fix multiline.

This commit is contained in:
John Livingston 2023-09-25 15:37:58 +02:00
parent b8aef07182
commit 6705cd9e3d
No known key found for this signature in database
GPG Key ID: B17B5640CE66CDBC

View File

@ -112,9 +112,9 @@ function _readMultiLineString (data: any, f: string): string {
if (typeof data[f] !== 'string') { if (typeof data[f] !== 'string') {
throw new Error('Invalid data type for field ' + f) throw new Error('Invalid data type for field ' + f)
} }
// Removing control characters. // Removing control characters (must authorize \u001A: line feed)
// eslint-disable-next-line no-control-regex // eslint-disable-next-line no-control-regex
const s = (data[f] as string).replace(/[\u0000-\u001F\u007F-\u009F]/g, '') const s = (data[f] as string).replace(/[\u0000-\u0009\u001B-\u001F\u007F-\u009F]/g, '')
return s return s
} }