mirror of
https://github.com/CorentinTh/it-tools.git
synced 2025-05-04 13:29:13 -04:00
fix: sonar
This commit is contained in:
parent
1fb3e1f922
commit
d30344beef
2 changed files with 2 additions and 2 deletions
|
@ -61,7 +61,7 @@ describe('qr-code-decoder', () => {
|
|||
authentication: 'WPA',
|
||||
hidden: 'false',
|
||||
name: 'ssid',
|
||||
password: 'password',
|
||||
password: 'password', // NOSONAR
|
||||
},
|
||||
});
|
||||
expect(parseQRData('BEGIN:VCALENDAR\nPRODID:-//xyz Corp//NONSGML PDA Calendar Version 1.0//EN\nVERSION:2.0\nBEGIN:VEVENT\nDTSTAMP:19960704T120000Z\nUID:uid1@example.com\nORGANIZER:mailto:jsmith@example.com\nDTSTART:19960918T143000Z\nDTEND:19960920T220000Z\nSTATUS:CONFIRMED\nCATEGORIES:CONFERENCE\nSUMMARY:Networld+Interop Conference\nDESCRIPTION:Networld+Interop Conference\n and Exhibit\\nAtlanta World Congress Center\\n\n Atlanta\\, Georgia\nEND:VEVENT\nEND:VCALENDAR'))
|
||||
|
|
|
@ -70,7 +70,7 @@ export function parseQRData(qrContent: string | null) {
|
|||
},
|
||||
};
|
||||
}
|
||||
if (/\w+:\/\//.test(qrContent)) {
|
||||
if (/^(?:https?|ftp):\/\//.test(qrContent)) {
|
||||
return {
|
||||
type: 'Url',
|
||||
value: qrContent,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue