mirror of
https://github.com/alam00000/bentopdf.git
synced 2026-11-10 09:14:34 +01:00
chore(security): fixes
This commit is contained in:
1 parent
121de29d80
commit
b040aef729
11 files changed
+59
-33
No files matched your search
@@ -754,7 +754,8 @@ function renderField(field: FormField): void {
|
||||
contentEl.appendChild(img);
|
||||
} catch (error) {
|
||||
console.warn(
|
||||
`Failed to render barcode preview for field "${field.name}":`,
|
||||
'Failed to render barcode preview for field:',
|
||||
String(field.name).replace(/[\r\n]+/g, ' '),
|
||||
error
|
||||
);
|
||||
contentEl.innerHTML = `<div class="flex flex-col items-center text-center p-1 text-gray-400"><i data-lucide="qr-code" class="w-6 h-6 mb-1"></i><span class="text-[10px] leading-tight">Invalid data</span></div>`;
|
||||
@@ -2320,11 +2321,17 @@ downloadBtn.addEventListener('click', async () => {
|
||||
if (existingField) {
|
||||
radioGroup = existingField as PDFRadioGroup;
|
||||
radioGroups.set(groupName, radioGroup);
|
||||
console.log(`Using existing radio group from PDF: ${groupName}`);
|
||||
console.log(
|
||||
'Using existing radio group from PDF:',
|
||||
String(groupName).replace(/[\r\n]+/g, ' ')
|
||||
);
|
||||
} else {
|
||||
radioGroup = form.createRadioGroup(groupName);
|
||||
radioGroups.set(groupName, radioGroup);
|
||||
console.log(`Created new radio group: ${groupName}`);
|
||||
console.log(
|
||||
'Created new radio group:',
|
||||
String(groupName).replace(/[\r\n]+/g, ' ')
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2690,7 +2697,8 @@ downloadBtn.addEventListener('click', async () => {
|
||||
pdfPage.drawImage(pngImage, { x, y, width, height });
|
||||
} catch (e) {
|
||||
console.warn(
|
||||
`Failed to generate barcode for field "${field.name}":`,
|
||||
'Failed to generate barcode for field:',
|
||||
String(field.name).replace(/[\r\n]+/g, ' '),
|
||||
e
|
||||
);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user