diff --git a/overviewer_core/data/js_src/util.js b/overviewer_core/data/js_src/util.js index f633eda47..4f9bda4b9 100644 --- a/overviewer_core/data/js_src/util.js +++ b/overviewer_core/data/js_src/util.js @@ -416,7 +416,9 @@ overviewer.util = { } // Add popup to marker if (marker_entry.createInfoWindow && db.text) { - layerObj.bindPopup(db.text); + layerObj.bindPopup( + document.createTextNode(db.text) + ); } // Add the polyline or marker to the layer marker_group.addLayer(layerObj); diff --git a/overviewer_core/data/web_assets/leaflet.css b/overviewer_core/data/web_assets/leaflet.css index 601476fe6..c757d3c79 100644 --- a/overviewer_core/data/web_assets/leaflet.css +++ b/overviewer_core/data/web_assets/leaflet.css @@ -472,6 +472,7 @@ svg.leaflet-image-layer.leaflet-interactive path { padding: 1px; text-align: left; border-radius: 12px; + white-space: pre-line; } .leaflet-popup-content { margin: 13px 19px;