Use encodeURIComponent for API call as suggested.

This commit is contained in:
LogMull 2024-01-17 20:25:14 -05:00 committed by GitHub
parent a0c7b1c37f
commit 37c6ea8675
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -270,7 +270,7 @@
.padStart(leadingZerosInt + 1, "0"); .padStart(leadingZerosInt + 1, "0");
let text = this.prefix + paddedNumber; let text = this.prefix + paddedNumber;
// See https://goqr.me/api/doc/create-qr-code/ // See https://goqr.me/api/doc/create-qr-code/
let qrCodeUrl = `https://api.qrserver.com/v1/create-qr-code/?size=300x300&data=${text}`; let qrCodeUrl = `https://api.qrserver.com/v1/create-qr-code/?size=300x300&data=${encodeURIComponent(text)}`;
this.labels.push({ qrCodeUrl, text }); this.labels.push({ qrCodeUrl, text });
} }