mirror of
https://github.com/sharevb/it-tools.git
synced 2026-11-20 21:23:08 +03:00
fix: sonar
This commit is contained in:
1 parent
1fb3e1f922
commit
d30344beef
2 files changed
+2
-2
No files matched your search
@@ -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,
|
||||
|
||||
Reference in new issue
Block a user