Skip to content

πŸ“š The open-source, offline-first Notion, Obsidian & Confluence alternative. Advanced Markdown, multi-tenant teams, OIDC/SSO, and local S3 backups. Deploy in one command.

Remove useless tags clean

Smaug6739096833934afa
diff --git a/frontend/app/components/CommandCenter/AdvancedSearchTab.vue b/frontend/app/components/CommandCenter/AdvancedSearchTab.vue
index 8832c93c..ec22084d 100644
--- a/frontend/app/components/CommandCenter/AdvancedSearchTab.vue
+++ b/frontend/app/components/CommandCenter/AdvancedSearchTab.vue
@@ -215,9 +215,9 @@ function buildDescription(doc: NodeSearchResult | Node): string {
// If we have a content snippet from fulltext search, show it
if ('content_snippet' in doc && doc.content_snippet) {
// Clean up HTML tags and show snippet
- const cleanSnippet = doc.content_snippet.replace(/<[^>]*>/g, '').trim();
- if (cleanSnippet) {
- return `...${highlightMatches(cleanSnippet)}...`;
+ if (doc.content_snippet) {
+ // No injection risk as content_snippet is generated by the backend and it's self provited content
+ return `...${highlightMatches(doc.content_snippet)}...`;
}
}
// Fallback to tags