From 5cf42ff4be23627b66bd039d6e8b9f2fbccb7b3b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicol=C3=B2=20P?= Date: Thu, 30 Oct 2025 09:36:53 +0100 Subject: [PATCH] Update marker parsing regex --- webgis/js/components/utils.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/webgis/js/components/utils.js b/webgis/js/components/utils.js index 6ec9d60..c3ab717 100644 --- a/webgis/js/components/utils.js +++ b/webgis/js/components/utils.js @@ -151,7 +151,10 @@ Utils.buildBibliography = async function(recordUri, recordId) { * to Stimulus links */ Utils.parseMarkers = function(text) { - const regex = /(?\[marker coords=\"(?[\d\s\.]+)\"\ ?(group=\"(?\w+)\")?](?[\w\s\.;:\-]+)\[\/marker\])/mig; + const regex = /(?\[marker coords=\"(?[\d\s\.]+)\"\ ?(group=\"(?\w+)\")?](?[\w\s\.;:\-\"\']+)\[\/marker\])/mig; + + if (!text) return text; + let matches = [...text.matchAll(regex)]; if (matches.length) {