Merge pull request #49 from covidpass-org/dev

Fix name regex
This commit is contained in:
Marvin Sextro 2021-07-25 12:55:02 +02:00 committed by GitHub
commit d927cb63c6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 3 deletions

View File

@ -73,11 +73,11 @@ export class Payload {
const firstName = nameInformation['gn'];
const lastName = nameInformation['fn'];
const transliteratedFirstName = nameInformation['gnt'];
const transliteratedLastName = nameInformation['fnt'];
const transliteratedFirstName = nameInformation['gnt'].replaceAll('<', ' ');
const transliteratedLastName = nameInformation['fnt'].replaceAll('<', ' ');
// Check if name contains non-latin characters
const nameRegex = new RegExp('^(\\p{Script=Latin}|[ -\'`´])+$', 'u');
const nameRegex = new RegExp('^[\\p{Script=Latin}\\p{P}\\p{M}\\p{Z}]+$', 'u');
let name: string;