We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent cffef7a commit dfb81afCopy full SHA for dfb81af
script.js
@@ -72,8 +72,17 @@ invoiceNameInput.addEventListener('input', () => {
72
analyzeButton.disabled = selectedFiles.length === 0 || !invoiceNameInput.value.trim();
73
});
74
75
+function escapeHtml(unsafe) {
76
+ return unsafe
77
+ .replace(/&/g, "&")
78
+ .replace(/</g, "<")
79
+ .replace(/>/g, ">")
80
+ .replace(/"/g, """)
81
+ .replace(/'/g, "'");
82
+}
83
+
84
function updateFileList() {
- fileList.innerHTML = selectedFiles.map(file => `<p>${file.name}</p>`).join('');
85
+ fileList.innerHTML = selectedFiles.map(file => `<p>${escapeHtml(file.name)}</p>`).join('');
86
}
87
88
analyzeButton.addEventListener('click', analyzeInvoices);
0 commit comments