Release: Merge develop to main (111 commits) #302

Merged
jason.woltje merged 114 commits from develop into main 2026-02-04 01:37:25 +00:00
2 changed files with 10 additions and 4 deletions
Showing only changes of commit b42c86360b - Show all commits

View File

@@ -56,14 +56,20 @@ function parseWikiLinks(html: string): string {
const trimmedSlug = slug.trim();
const text = displayText?.trim() ?? trimmedSlug;
// Validate slug contains only safe characters
if (!/^[a-zA-Z0-9\-_./]+$/.test(trimmedSlug)) {
// Invalid slug - return original text without creating a link
return escapeHtml(match);
}
// Create a styled link
// Using data-wiki-link attribute for styling and click handling
return `<a
return `<a
href="/knowledge/${encodeURIComponent(trimmedSlug)}"
data-wiki-link="true"
data-slug="${encodeURIComponent(trimmedSlug)}"
class="wiki-link text-blue-600 dark:text-blue-400 hover:text-blue-800 dark:hover:text-blue-300 underline decoration-dotted hover:decoration-solid transition-colors"
title="Go to ${trimmedSlug}"
title="Go to ${escapeHtml(trimmedSlug)}"
>${escapeHtml(text)}</a>`;
});
}

View File

@@ -36,10 +36,10 @@ export function MermaidViewer({
theme: isDark ? "dark" : "default",
flowchart: {
useMaxWidth: true,
htmlLabels: true,
htmlLabels: false,
curve: "basis",
},
securityLevel: "loose",
securityLevel: "strict",
});
// Generate unique ID for this render