diff --git a/index.html b/index.html
index cde1991..886088a 100644
--- a/index.html
+++ b/index.html
@@ -5,6 +5,8 @@
+
BJORN // WIKI NODE
@@ -1163,7 +1165,7 @@
links.forEach(link => {
container.innerHTML += `
-
+
${link.name}
`;
@@ -1205,7 +1207,7 @@
if (CONFIG.social.discord) {
const inviteCode = CONFIG.social.discord.split('/').pop();
container.innerHTML += `
-
+
`;
@@ -1214,7 +1216,7 @@
if (CONFIG.social.reddit) {
const subreddit = CONFIG.social.reddit.split('/r/').pop().replace(/\/$/, '');
container.innerHTML += `
-
+
`;
@@ -1223,7 +1225,7 @@
if (CONFIG.social.github) {
const repoPath = CONFIG.social.github.replace('https://github.com/', '');
container.innerHTML += `
-
+
`;
@@ -1231,7 +1233,7 @@
if (CONFIG.social.buyMeACoffee) {
container.innerHTML += `
-
+
`;
@@ -2076,7 +2078,12 @@
if (contentMatch !== -1) {
const start = Math.max(0, contentMatch - 40);
const end = Math.min(item.content.length, contentMatch + 80);
- snippet = item.content.substring(start, end).replace(new RegExp(q, 'gi'), (m) => `${m}`);
+ let rawSnippet = item.content.substring(start, end);
+
+ // Sanitize first to prevent XSS, then highlight
+ const safeSnippet = DOMPurify.sanitize(rawSnippet);
+ snippet = safeSnippet.replace(new RegExp(q, 'gi'), (m) => `${m}`);
+
if (start > 0) snippet = "..." + snippet;
if (end < item.content.length) snippet = snippet + "...";
}
@@ -2202,7 +2209,7 @@
${new Date(r.published_at).toLocaleDateString()}
${body}
- View on GitHub →
+ View on GitHub →
`;
list.appendChild(div);
});