diff --git a/fossils/index.html b/fossils/index.html
index 0f454bfba..5baf3f4f3 100644
--- a/fossils/index.html
+++ b/fossils/index.html
@@ -824,6 +824,12 @@
๐ About The Fossil Record
});
}
+ function escapeHtml(str) {
+ const div = document.createElement('div');
+ div.appendChild(document.createTextNode(str));
+ return div.innerHTML;
+ }
+
function showTooltip(event, d) {
const archConfig = ARCHITECTURES[d.arch] || { label: d.arch };
@@ -849,7 +855,7 @@ ๐ About The Fossil Record
html += `
Sample Miners:
- ${sampleMiners.join(', ')}
+ ${escapeHtml(sampleMiners.join(', '))}
`;
}
@@ -915,7 +921,7 @@ ๐ About The Fossil Record
const container = d3.select('#visualization');
container.html(`
-
Error loading data: ${message}
+
Error loading data: ${escapeHtml(message)}
`;
html += `Total: ${total}
`;