From 6c22fa70de4bddd53991adc5fafc2247450eee21 Mon Sep 17 00:00:00 2001 From: j Date: Sat, 19 Aug 2023 16:37:05 +0200 Subject: [PATCH] fix relative img/href links --- app/static/js/item.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/app/static/js/item.js b/app/static/js/item.js index 24d32a1..6a02483 100644 --- a/app/static/js/item.js +++ b/app/static/js/item.js @@ -114,6 +114,11 @@ async function loadData(id, args) { ${layerData.title} `) data.layers[layer].forEach(annotation => { + annotation.value = annotation.value.replace( + /src="\//g, `src="${pandora.url.origin}/` + ).replace( + /href="\//g, `href="${pandora.url.origin}/` + ) html.push(`
${annotation.value}