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) {