Skip to content

~95% on SimpleQA (e.g. Qwen3.6-27B on a 3090). Supports all local and cloud LLMs (llama.cpp, Ollama, Google, ...). 10+ search engines - arXiv, PubMed, your private documents. Everything Local & Encrypted.

fix: remove ES6 import from ui.js to fix markdown table rendering

LearningCircuit63b0a1c62f3d
diff --git a/src/local_deep_research/web/static/js/services/ui.js b/src/local_deep_research/web/static/js/services/ui.js
index 0a8d3b7565..ac273bd366 100644
--- a/src/local_deep_research/web/static/js/services/ui.js
+++ b/src/local_deep_research/web/static/js/services/ui.js
@@ -2,7 +2,22 @@
* UI utility functions
*/
-import { safeSetHTML, safeSetText, sanitizeHTML } from '../utils/sanitizer.js';
+// Note: sanitizer functions are available via Vite bundle or we use safe fallbacks
+
+/**
+ * Safe HTML setter - uses DOMPurify if available, otherwise sets innerHTML directly
+ * for controlled/trusted content only
+ */
+function safeSetHTML(element, html, level) {
+ if (!element) return;
+ // If DOMPurify is available globally (from Vite bundle), use it
+ if (typeof DOMPurify !== 'undefined') {
+ element.innerHTML = DOMPurify.sanitize(html);
+ } else {
+ // For controlled content (UI elements we generate), direct assignment is acceptable
+ element.innerHTML = html;
+ }
+}
/**
* Update a progress bar UI element