Fix: enforce image fallback and remove fileLimiter from uploads routes

This commit is contained in:
dev
2026-10-28 15:30:38 +03:00
parent 617ed60e65
commit dd934baf5d
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -30,7 +30,7 @@
text = text.replace(/!\[([^\]]*)\]\(([^)\s]+)\)/g, (m, alt, src) => {
const url = safeUrl(src.replace(/&/g, '&'));
if (!url) return alt;
return `<img src="${esc(thumbUrl(url))}" data-img="${esc(url)}" alt="${esc(alt)}" loading="lazy">`;
return `<img src="${esc(thumbUrl(url))}" data-img="${esc(url)}" alt="${esc(alt)}" loading="lazy" onerror="this.onerror=null;this.src='${esc(url)}'">`;
});
text = text.replace(/\[([^\]]+)\]\(([^)\s]+)\)/g, (m, label, href) => {
const url = safeUrl(href.replace(/&amp;/g, '&'));