~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.
Python academiaanthropicarxivbravedeep-researchencryptionhome-automationhomeserverlocallocal-deep-researchlocal-llmmistralollamaopenaipubmedresearchresearch-toolretrieval-augmented-generationsearxngself-hosted
chore(security): add eslint-plugin-no-unsanitized for innerHTML XSS detection (#3250)
LearningCircuit54ba2b2c21e3
diff --git a/.github/workflows/pre-commit.yml b/.github/workflows/pre-commit.ymlindex 94bd654fdd..8c4f1e9954 100644--- a/.github/workflows/pre-commit.yml+++ b/.github/workflows/pre-commit.yml@@ -35,6 +35,14 @@ jobs:with:python-version: '3.12'+ - name: Set up Node.js+ uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6.2.0+ with:+ node-version: '24'++ - name: Install Node.js dependencies+ run: npm ci+- name: Install system dependencies for SQLCipherrun: |sudo apt-get updatediff --git a/.pre-commit-config.yaml b/.pre-commit-config.yamlindex ca6522f9e9..b3f3391b05 100644--- a/.pre-commit-config.yaml+++ b/.pre-commit-config.yaml@@ -44,6 +44,7 @@ repos:args: ['--config', 'eslint.config.js']additional_dependencies:- repo: https://github.com/astral-sh/ruff-pre-commit# Ruff version.rev: v0.15.8diff --git a/eslint.config.js b/eslint.config.jsindex 54ca89432e..1e1a925c28 100644--- a/eslint.config.js+++ b/eslint.config.js@@ -1,25 +1,58 @@// ESLint flat config for JavaScript files// https://eslint.org/docs/latest/use/configure/configuration-files-new+import nounsanitized from "eslint-plugin-no-unsanitized";++// Recognized safe escape/sanitize methods for no-unsanitized plugin.+// Implementations:+// escapeHtml, esc — security/xss-protection.js (escapes & < > " ')+// DOMPurify.sanitize — app.js imports dompurify, exposed as window.DOMPurify+// sanitizeHtml/sanitizeHTML — security/xss-protection.js / utils/sanitizer.js+const escapeConfig = {+ escape: {+ methods: [+ "escapeHtml",+ "esc",+ "DOMPurify.sanitize",+ "window.DOMPurify.sanitize",+ "sanitizeHtml",+ "sanitizeHTML",+ "window.escapeHtml",+ "window.sanitizeHtml",+ "window.XSSProtection.escapeHtml",+ ],+ },+};+export default [+ // Global ignores — must be a standalone object (no "files" key) for ESLint flat config{- // Apply to all JavaScript files- files: ["**/*.js", "**/*.mjs"],-- // Ignore common directoriesignores: [- "node_modules/**",+ "**/node_modules/**",+ "**/static/dist/**",+ "tests/ldr-news-dev-files/**","dist/**","build/**","**/*.min.js",- "tests/ui_tests/node_modules/**",],+ },+ {+ // Apply to all JavaScript files+ files: ["**/*.js", "**/*.mjs"],++ plugins: {+ "no-unsanitized": nounsanitized,+ },// Basic rules - keep it minimal to avoid breaking existing coderules: {// Only error on critical issues"no-undef": "off", // Disabled - browser globals not defined"no-unused-vars": "off", // Disabled - too noisy for existing code++ // XSS prevention - detect unescaped data in innerHTML/outerHTML/document.write+ "no-unsanitized/property": ["error", escapeConfig],+ "no-unsanitized/method": ["error", escapeConfig],},languageOptions: {diff --git a/package-lock.json b/package-lock.jsonindex 56ab57f09a..0c5758c5b2 100644--- a/package-lock.json+++ b/package-lock.json@@ -23,6 +23,7 @@"socket.io-client": "^4.8.3"},"devDependencies": {+ "eslint-plugin-no-unsanitized": "^4.1.5","vite": "^7.3.1"},"engines": {@@ -480,6 +481,121 @@"node": ">=18"}},+ "node_modules/@eslint-community/eslint-utils": {+ "version": "4.9.1",+ "resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.9.1.tgz",+ "integrity": "sha512-phrYmNiYppR7znFEdqgfWHXR6NCkZEK7hwWDHZUjit/2/U0r6XvkDl0SYnoM51Hq7FhCGdLDT6zxCCOY1hexsQ==",+ "dev": true,+ "license": "MIT",+ "peer": true,+ "dependencies": {+ "eslint-visitor-keys": "^3.4.3"+ },+ "engines": {+ "node": "^12.22.0 || ^14.17.0 || >=16.0.0"+ },+ "funding": {+ "url": "https://opencollective.com/eslint"+ },+ "peerDependencies": {+ "eslint": "^6.0.0 || ^7.0.0 || >=8.0.0"+ }+ },+ "node_modules/@eslint-community/eslint-utils/node_modules/eslint-visitor-keys": {+ "version": "3.4.3",+ "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz",+ "integrity": "sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==",+ "dev": true,+ "license": "Apache-2.0",+ "peer": true,+ "engines": {+ "node": "^12.22.0 || ^14.17.0 || >=16.0.0"+ },+ "funding": {+ "url": "https://opencollective.com/eslint"+ }+ },+ "node_modules/@eslint-community/regexpp": {+ "version": "4.12.2",+ "resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.12.2.tgz",+ "integrity": "sha512-EriSTlt5OC9/7SXkRSCAhfSxxoSUgBm33OH+IkwbdpgoqsSsUg7y3uh+IICI/Qg4BBWr3U2i39RpmycbxMq4ew==",+ "dev": true,+ "license": "MIT",+ "peer": true,+ "engines": {+ "node": "^12.0.0 || ^14.0.0 || >=16.0.0"+ }+ },+ "node_modules/@eslint/config-array": {+ "version": "0.23.3",+ "resolved": "https://registry.npmjs.org/@eslint/config-array/-/config-array-0.23.3.tgz",+ "integrity": "sha512-j+eEWmB6YYLwcNOdlwQ6L2OsptI/LO6lNBuLIqe5R7RetD658HLoF+Mn7LzYmAWWNNzdC6cqP+L6r8ujeYXWLw==",+ "dev": true,+ "license": "Apache-2.0",+ "peer": true,+ "dependencies": {+ "@eslint/object-schema": "^3.0.3",+ "debug": "^4.3.1",+ "minimatch": "^10.2.4"+ },+ "engines": {+ "node": "^20.19.0 || ^22.13.0 || >=24"+ }+ },+ "node_modules/@eslint/config-helpers": {+ "version": "0.5.3",+ "resolved": "https://registry.npmjs.org/@eslint/config-helpers/-/config-helpers-0.5.3.tgz",+ "integrity": "sha512-lzGN0onllOZCGroKJmRwY6QcEHxbjBw1gwB8SgRSqK8YbbtEXMvKynsXc3553ckIEBxsbMBU7oOZXKIPGZNeZw==",+ "dev": true,+ "license": "Apache-2.0",+ "peer": true,+ "dependencies": {+ "@eslint/core": "^1.1.1"+ },+ "engines": {+ "node": "^20.19.0 || ^22.13.0 || >=24"+ }+ },+ "node_modules/@eslint/core": {+ "version": "1.1.1",+ "resolved": "https://registry.npmjs.org/@eslint/core/-/core-1.1.1.tgz",+ "integrity": "sha512-QUPblTtE51/7/Zhfv8BDwO0qkkzQL7P/aWWbqcf4xWLEYn1oKjdO0gglQBB4GAsu7u6wjijbCmzsUTy6mnk6oQ==",+ "dev": true,+ "license": "Apache-2.0",+ "peer": true,+ "dependencies": {+ "@types/json-schema": "^7.0.15"+ },+ "engines": {+ "node": "^20.19.0 || ^22.13.0 || >=24"+ }+ },+ "node_modules/@eslint/object-schema": {+ "version": "3.0.3",+ "resolved": "https://registry.npmjs.org/@eslint/object-schema/-/object-schema-3.0.3.tgz",+ "integrity": "sha512-iM869Pugn9Nsxbh/YHRqYiqd23AmIbxJOcpUMOuWCVNdoQJ5ZtwL6h3t0bcZzJUlC3Dq9jCFCESBZnX0GTv7iQ==",+ "dev": true,+ "license": "Apache-2.0",+ "peer": true,+ "engines": {+ "node": "^20.19.0 || ^22.13.0 || >=24"+ }+ },+ "node_modules/@eslint/plugin-kit": {+ "version": "0.6.1",+ "resolved": "https://registry.npmjs.org/@eslint/plugin-kit/-/plugin-kit-0.6.1.tgz",+ "integrity": "sha512-iH1B076HoAshH1mLpHMgwdGeTs0CYwL0SPMkGuSebZrwBp16v415e9NZXg2jtrqPVQjf6IANe2Vtlr5KswtcZQ==",+ "dev": true,+ "license": "Apache-2.0",+ "peer": true,+ "dependencies": {+ "@eslint/core": "^1.1.1",+ "levn": "^0.4.1"+ },+ "engines": {+ "node": "^20.19.0 || ^22.13.0 || >=24"+ }+ },"node_modules/@fortawesome/fontawesome-free": {"version": "7.2.0","resolved": "https://registry.npmjs.org/@fortawesome/fontawesome-free/-/fontawesome-free-7.2.0.tgz",@@ -489,6 +605,62 @@"node": ">=6"}},+ "node_modules/@humanfs/core": {+ "version": "0.19.1",+ "resolved": "https://registry.npmjs.org/@humanfs/core/-/core-0.19.1.tgz",+ "integrity": "sha512-5DyQ4+1JEUzejeK1JGICcideyfUbGixgS9jNgex5nqkW+cY7WZhxBigmieN5Qnw9ZosSNVC9KQKyb+GUaGyKUA==",+ "dev": true,+ "license": "Apache-2.0",+ "peer": true,+ "engines": {+ "node": ">=18.18.0"+ }+ },+ "node_modules/@humanfs/node": {+ "version": "0.16.7",+ "resolved": "https://registry.npmjs.org/@humanfs/node/-/node-0.16.7.tgz",+ "integrity": "sha512-/zUx+yOsIrG4Y43Eh2peDeKCxlRt/gET6aHfaKpuq267qXdYDFViVHfMaLyygZOnl0kGWxFIgsBy8QFuTLUXEQ==",+ "dev": true,+ "license": "Apache-2.0",+ "peer": true,+ "dependencies": {+ "@humanfs/core": "^0.19.1",+ "@humanwhocodes/retry": "^0.4.0"+ },+ "engines": {+ "node": ">=18.18.0"+ }+ },+ "node_modules/@humanwhocodes/module-importer": {+ "version": "1.0.1",+ "resolved": "https://registry.npmjs.org/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz",+ "integrity": "sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==",+ "dev": true,+ "license": "Apache-2.0",+ "peer": true,+ "engines": {+ "node": ">=12.22"+ },+ "funding": {+ "type": "github",+ "url": "https://github.com/sponsors/nzakas"+ }+ },+ "node_modules/@humanwhocodes/retry": {+ "version": "0.4.3",+ "resolved": "https://registry.npmjs.org/@humanwhocodes/retry/-/retry-0.4.3.tgz",+ "integrity": "sha512-bV0Tgo9K4hfPCek+aMAn81RppFKv2ySDQeMoSZuvTASywNTnVJCArCZE2FWqpvIatKu7VMRLWlR1EazvVhDyhQ==",+ "dev": true,+ "license": "Apache-2.0",+ "peer": true,+ "engines": {+ "node": ">=18.18"+ },+ "funding": {+ "type": "github",+ "url": "https://github.com/sponsors/nzakas"+ }+ },"node_modules/@kurkle/color": {"version": "0.3.4","resolved": "https://registry.npmjs.org/@kurkle/color/-/color-0.3.4.tgz",@@ -862,6 +1034,14 @@"integrity": "sha512-9BCxFwvbGg/RsZK9tjXd8s4UcwR0MWeFQ1XEKIQVVvAGJyINdrqKMcTRyLoK8Rse1GjzLV9cwjWV1olXRWEXVA==","license": "MIT"},+ "node_modules/@types/esrecurse": {+ "version": "4.3.1",+ "resolved": "https://registry.npmjs.org/@types/esrecurse/-/esrecurse-4.3.1.tgz",+ "integrity": "sha512-xJBAbDifo5hpffDBuHl0Y8ywswbiAp/Wi7Y/GtAgSlZyIABppyurxVueOPE8LUQOxdlgi6Zqce7uoEpqNTeiUw==",+ "dev": true,+ "license": "MIT",+ "peer": true+ },"node_modules/@types/estree": {"version": "1.0.8","resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.8.tgz",@@ -869,6 +1049,14 @@"dev": true,"license": "MIT"},+ "node_modules/@types/json-schema": {+ "version": "7.0.15",+ "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.15.tgz",+ "integrity": "sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==",+ "dev": true,+ "license": "MIT",+ "peer": true+ },"node_modules/@types/pako": {"version": "2.0.4","resolved": "https://registry.npmjs.org/@types/pako/-/pako-2.0.4.tgz",@@ -889,6 +1077,60 @@"license": "MIT","optional": true},+ "node_modules/acorn": {+ "version": "8.16.0",+ "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.16.0.tgz",+ "integrity": "sha512-UVJyE9MttOsBQIDKw1skb9nAwQuR5wuGD3+82K6JgJlm/Y+KI92oNsMNGZCYdDsVtRHSak0pcV5Dno5+4jh9sw==",+ "dev": true,+ "license": "MIT",+ "peer": true,+ "bin": {+ "acorn": "bin/acorn"+ },+ "engines": {+ "node": ">=0.4.0"+ }+ },+ "node_modules/acorn-jsx": {+ "version": "5.3.2",+ "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.2.tgz",+ "integrity": "sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==",+ "dev": true,+ "license": "MIT",+ "peer": true,+ "peerDependencies": {+ "acorn": "^6.0.0 || ^7.0.0 || ^8.0.0"+ }+ },+ "node_modules/ajv": {+ "version": "6.14.0",+ "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.14.0.tgz",+ "integrity": "sha512-IWrosm/yrn43eiKqkfkHis7QioDleaXQHdDVPKg0FSwwd/DuvyX79TZnFOnYpB7dcsFAMmtFztZuXPDvSePkFw==",+ "dev": true,+ "license": "MIT",+ "peer": true,+ "dependencies": {+ "fast-deep-equal": "^3.1.1",+ "fast-json-stable-stringify": "^2.0.0",+ "json-schema-traverse": "^0.4.1",+ "uri-js": "^4.2.2"+ },+ "funding": {+ "type": "github",+ "url": "https://github.com/sponsors/epoberezkin"+ }+ },+ "node_modules/balanced-match": {+ "version": "4.0.4",+ "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-4.0.4.tgz",+ "integrity": "sha512-BLrgEcRTwX2o6gGxGOCNyMvGSp35YofuYzw9h1IMTRmKqttAZZVU67bdb9Pr2vUHA8+j3i2tJfjO6C6+4myGTA==",+ "dev": true,+ "license": "MIT",+ "peer": true,+ "engines": {+ "node": "18 || 20 || >=22"+ }+ },"node_modules/base64-arraybuffer": {"version": "1.0.2","resolved": "https://registry.npmjs.org/base64-arraybuffer/-/base64-arraybuffer-1.0.2.tgz",@@ -933,6 +1175,20 @@],"license": "MIT"},+ "node_modules/brace-expansion": {+ "version": "5.0.5",+ "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-5.0.5.tgz",+ "integrity": "sha512-VZznLgtwhn+Mact9tfiwx64fA9erHH/MCXEUfB/0bX/6Fz6ny5EGTXYltMocqg4xFAQZtnO3DHWWXi8RiuN7cQ==",+ "dev": true,+ "license": "MIT",+ "peer": true,+ "dependencies": {+ "balanced-match": "^4.0.2"+ },+ "engines": {+ "node": "18 || 20 || >=22"+ }+ },"node_modules/canvg": {"version": "3.0.11","resolved": "https://registry.npmjs.org/canvg/-/canvg-3.0.11.tgz",@@ -996,6 +1252,22 @@"url": "https://opencollective.com/core-js"}},+ "node_modules/cross-spawn": {+ "version": "7.0.6",+ "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.6.tgz",+ "integrity": "sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==",+ "dev": true,+ "license": "MIT",+ "peer": true,+ "dependencies": {+ "path-key": "^3.1.0",+ "shebang-command": "^2.0.0",+ "which": "^2.0.1"+ },+ "engines": {+ "node": ">= 8"+ }+ },"node_modules/css-line-break": {"version": "2.1.0","resolved": "https://registry.npmjs.org/css-line-break/-/css-line-break-2.1.0.tgz",@@ -1032,6 +1304,14 @@}}},+ "node_modules/deep-is": {+ "version": "0.1.4",+ "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.4.tgz",+ "integrity": "sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==",+ "dev": true,+ "license": "MIT",+ "peer": true+ },"node_modules/dompurify": {"version": "3.3.3","resolved": "https://registry.npmjs.org/dompurify/-/dompurify-3.3.3.tgz",@@ -1105,6 +1385,214 @@"@esbuild/win32-x64": "0.27.4"}},+ "node_modules/escape-string-regexp": {+ "version": "4.0.0",+ "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz",+ "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==",+ "dev": true,+ "license": "MIT",+ "peer": true,+ "engines": {+ "node": ">=10"+ },+ "funding": {+ "url": "https://github.com/sponsors/sindresorhus"+ }+ },+ "node_modules/eslint": {+ "version": "10.1.0",+ "resolved": "https://registry.npmjs.org/eslint/-/eslint-10.1.0.tgz",+ "integrity": "sha512-S9jlY/ELKEUwwQnqWDO+f+m6sercqOPSqXM5Go94l7DOmxHVDgmSFGWEzeE/gwgTAr0W103BWt0QLe/7mabIvA==",+ "dev": true,+ "license": "MIT",+ "peer": true,+ "dependencies": {+ "@eslint-community/eslint-utils": "^4.8.0",+ "@eslint-community/regexpp": "^4.12.2",+ "@eslint/config-array": "^0.23.3",+ "@eslint/config-helpers": "^0.5.3",+ "@eslint/core": "^1.1.1",+ "@eslint/plugin-kit": "^0.6.1",+ "@humanfs/node": "^0.16.6",+ "@humanwhocodes/module-importer": "^1.0.1",+ "@humanwhocodes/retry": "^0.4.2",+ "@types/estree": "^1.0.6",+ "ajv": "^6.14.0",+ "cross-spawn": "^7.0.6",+ "debug": "^4.3.2",+ "escape-string-regexp": "^4.0.0",+ "eslint-scope": "^9.1.2",+ "eslint-visitor-keys": "^5.0.1",+ "espree": "^11.2.0",+ "esquery": "^1.7.0",+ "esutils": "^2.0.2",+ "fast-deep-equal": "^3.1.3",+ "file-entry-cache": "^8.0.0",+ "find-up": "^5.0.0",+ "glob-parent": "^6.0.2",+ "ignore": "^5.2.0",+ "imurmurhash": "^0.1.4",+ "is-glob": "^4.0.0",+ "json-stable-stringify-without-jsonify": "^1.0.1",+ "minimatch": "^10.2.4",+ "natural-compare": "^1.4.0",+ "optionator": "^0.9.3"+ },+ "bin": {+ "eslint": "bin/eslint.js"+ },+ "engines": {+ "node": "^20.19.0 || ^22.13.0 || >=24"+ },+ "funding": {+ "url": "https://eslint.org/donate"+ },+ "peerDependencies": {+ "jiti": "*"+ },+ "peerDependenciesMeta": {+ "jiti": {+ "optional": true+ }+ }+ },+ "node_modules/eslint-plugin-no-unsanitized": {+ "version": "4.1.5",+ "resolved": "https://registry.npmjs.org/eslint-plugin-no-unsanitized/-/eslint-plugin-no-unsanitized-4.1.5.tgz",+ "integrity": "sha512-MSB4hXPVFQrI8weqzs6gzl7reP2k/qSjtCoL2vUMSDejIIq9YL1ZKvq5/ORBXab/PvfBBrWO2jWviYpL+4Ghfg==",+ "dev": true,+ "license": "MPL-2.0",+ "peerDependencies": {+ "eslint": "^9 || ^10"+ }+ },+ "node_modules/eslint-scope": {+ "version": "9.1.2",+ "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-9.1.2.tgz",+ "integrity": "sha512-xS90H51cKw0jltxmvmHy2Iai1LIqrfbw57b79w/J7MfvDfkIkFZ+kj6zC3BjtUwh150HsSSdxXZcsuv72miDFQ==",+ "dev": true,+ "license": "BSD-2-Clause",+ "peer": true,+ "dependencies": {+ "@types/esrecurse": "^4.3.1",+ "@types/estree": "^1.0.8",+ "esrecurse": "^4.3.0",+ "estraverse": "^5.2.0"+ },+ "engines": {+ "node": "^20.19.0 || ^22.13.0 || >=24"+ },+ "funding": {+ "url": "https://opencollective.com/eslint"+ }+ },+ "node_modules/eslint-visitor-keys": {+ "version": "5.0.1",+ "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-5.0.1.tgz",+ "integrity": "sha512-tD40eHxA35h0PEIZNeIjkHoDR4YjjJp34biM0mDvplBe//mB+IHCqHDGV7pxF+7MklTvighcCPPZC7ynWyjdTA==",+ "dev": true,+ "license": "Apache-2.0",+ "peer": true,+ "engines": {+ "node": "^20.19.0 || ^22.13.0 || >=24"+ },+ "funding": {+ "url": "https://opencollective.com/eslint"+ }+ },+ "node_modules/espree": {+ "version": "11.2.0",+ "resolved": "https://registry.npmjs.org/espree/-/espree-11.2.0.tgz",+ "integrity": "sha512-7p3DrVEIopW1B1avAGLuCSh1jubc01H2JHc8B4qqGblmg5gI9yumBgACjWo4JlIc04ufug4xJ3SQI8HkS/Rgzw==",+ "dev": true,+ "license": "BSD-2-Clause",+ "peer": true,+ "dependencies": {+ "acorn": "^8.16.0",+ "acorn-jsx": "^5.3.2",+ "eslint-visitor-keys": "^5.0.1"+ },+ "engines": {+ "node": "^20.19.0 || ^22.13.0 || >=24"+ },+ "funding": {+ "url": "https://opencollective.com/eslint"+ }+ },+ "node_modules/esquery": {+ "version": "1.7.0",+ "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.7.0.tgz",+ "integrity": "sha512-Ap6G0WQwcU/LHsvLwON1fAQX9Zp0A2Y6Y/cJBl9r/JbW90Zyg4/zbG6zzKa2OTALELarYHmKu0GhpM5EO+7T0g==",+ "dev": true,+ "license": "BSD-3-Clause",+ "peer": true,+ "dependencies": {+ "estraverse": "^5.1.0"+ },+ "engines": {+ "node": ">=0.10"+ }+ },+ "node_modules/esrecurse": {+ "version": "4.3.0",+ "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz",+ "integrity": "sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==",+ "dev": true,+ "license": "BSD-2-Clause",+ "peer": true,+ "dependencies": {+ "estraverse": "^5.2.0"+ },+ "engines": {+ "node": ">=4.0"+ }+ },+ "node_modules/estraverse": {+ "version": "5.3.0",+ "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz",+ "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==",+ "dev": true,+ "license": "BSD-2-Clause",+ "peer": true,+ "engines": {+ "node": ">=4.0"+ }+ },+ "node_modules/esutils": {+ "version": "2.0.3",+ "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz",+ "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==",+ "dev": true,+ "license": "BSD-2-Clause",+ "peer": true,+ "engines": {+ "node": ">=0.10.0"+ }+ },+ "node_modules/fast-deep-equal": {+ "version": "3.1.3",+ "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz",+ "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==",+ "dev": true,+ "license": "MIT",+ "peer": true+ },+ "node_modules/fast-json-stable-stringify": {+ "version": "2.1.0",+ "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz",+ "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==",+ "dev": true,+ "license": "MIT",+ "peer": true+ },+ "node_modules/fast-levenshtein": {+ "version": "2.0.6",+ "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz",+ "integrity": "sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==",+ "dev": true,+ "license": "MIT",+ "peer": true+ },"node_modules/fast-png": {"version": "6.4.0","resolved": "https://registry.npmjs.org/fast-png/-/fast-png-6.4.0.tgz",@@ -1140,6 +1628,61 @@"integrity": "sha512-cPJU47OaAoCbg0pBvzsgpTPhmhqI5eJjh/JIu8tPj5q+T7iLvW/JAYUqmE7KOB4R1ZyEhzBaIQpQpardBF5z8A==","license": "MIT"},+ "node_modules/file-entry-cache": {+ "version": "8.0.0",+ "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-8.0.0.tgz",+ "integrity": "sha512-XXTUwCvisa5oacNGRP9SfNtYBNAMi+RPwBFmblZEF7N7swHYQS6/Zfk7SRwx4D5j3CH211YNRco1DEMNVfZCnQ==",+ "dev": true,+ "license": "MIT",+ "peer": true,+ "dependencies": {+ "flat-cache": "^4.0.0"+ },+ "engines": {+ "node": ">=16.0.0"+ }+ },+ "node_modules/find-up": {+ "version": "5.0.0",+ "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz",+ "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==",+ "dev": true,+ "license": "MIT",+ "peer": true,+ "dependencies": {+ "locate-path": "^6.0.0",+ "path-exists": "^4.0.0"+ },+ "engines": {+ "node": ">=10"+ },+ "funding": {+ "url": "https://github.com/sponsors/sindresorhus"+ }+ },+ "node_modules/flat-cache": {+ "version": "4.0.1",+ "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-4.0.1.tgz",+ "integrity": "sha512-f7ccFPK3SXFHpx15UIGyRJ/FJQctuKZ0zVuN3frBo4HnK3cay9VEW0R6yPYFHC0AgqhukPzKjq22t5DmAyqGyw==",+ "dev": true,+ "license": "MIT",+ "peer": true,+ "dependencies": {+ "flatted": "^3.2.9",+ "keyv": "^4.5.4"+ },+ "engines": {+ "node": ">=16"+ }+ },+ "node_modules/flatted": {+ "version": "3.4.2",+ "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.4.2.tgz",+ "integrity": "sha512-PjDse7RzhcPkIJwy5t7KPWQSZ9cAbzQXcafsetQoD7sOJRQlGikNbx7yZp2OotDnJyrDcbyRq3Ttb18iYOqkxA==",+ "dev": true,+ "license": "ISC",+ "peer": true+ },"node_modules/fsevents": {"version": "2.3.3","resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz",@@ -1155,6 +1698,20 @@"node": "^8.16.0 || ^10.6.0 || >=11.0.0"}},+ "node_modules/glob-parent": {+ "version": "6.0.2",+ "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz",+ "integrity": "sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==",+ "dev": true,+ "license": "ISC",+ "peer": true,+ "dependencies": {+ "is-glob": "^4.0.3"+ },+ "engines": {+ "node": ">=10.13.0"+ }+ },"node_modules/highlight.js": {"version": "11.11.1","resolved": "https://registry.npmjs.org/highlight.js/-/highlight.js-11.11.1.tgz",@@ -1177,12 +1734,91 @@"node": ">=8.0.0"}},+ "node_modules/ignore": {+ "version": "5.3.2",+ "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.2.tgz",+ "integrity": "sha512-hsBTNUqQTDwkWtcdYI2i06Y/nUBEsNEDJKjWdigLvegy8kDuJAS8uRlpkkcQpyEXL0Z/pjDy5HBmMjRCJ2gq+g==",+ "dev": true,+ "license": "MIT",+ "peer": true,+ "engines": {+ "node": ">= 4"+ }+ },+ "node_modules/imurmurhash": {+ "version": "0.1.4",+ "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz",+ "integrity": "sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==",+ "dev": true,+ "license": "MIT",+ "peer": true,+ "engines": {+ "node": ">=0.8.19"+ }+ },"node_modules/iobuffer": {"version": "5.4.0","resolved": "https://registry.npmjs.org/iobuffer/-/iobuffer-5.4.0.tgz","integrity": "sha512-DRebOWuqDvxunfkNJAlc3IzWIPD5xVxwUNbHr7xKB8E6aLJxIPfNX3CoMJghcFjpv6RWQsrcJbghtEwSPoJqMA==","license": "MIT"},+ "node_modules/is-extglob": {+ "version": "2.1.1",+ "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz",+ "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==",+ "dev": true,+ "license": "MIT",+ "peer": true,+ "engines": {+ "node": ">=0.10.0"+ }+ },+ "node_modules/is-glob": {+ "version": "4.0.3",+ "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz",+ "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==",+ "dev": true,+ "license": "MIT",+ "peer": true,+ "dependencies": {+ "is-extglob": "^2.1.1"+ },+ "engines": {+ "node": ">=0.10.0"+ }+ },+ "node_modules/isexe": {+ "version": "2.0.0",+ "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz",+ "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==",+ "dev": true,+ "license": "ISC",+ "peer": true+ },+ "node_modules/json-buffer": {+ "version": "3.0.1",+ "resolved": "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.1.tgz",+ "integrity": "sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ==",+ "dev": true,+ "license": "MIT",+ "peer": true+ },+ "node_modules/json-schema-traverse": {+ "version": "0.4.1",+ "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz",+ "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==",+ "dev": true,+ "license": "MIT",+ "peer": true+ },+ "node_modules/json-stable-stringify-without-jsonify": {+ "version": "1.0.1",+ "resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz",+ "integrity": "sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==",+ "dev": true,+ "license": "MIT",+ "peer": true+ },"node_modules/jspdf": {"version": "4.2.1","resolved": "https://registry.npmjs.org/jspdf/-/jspdf-4.2.1.tgz",@@ -1200,6 +1836,49 @@"html2canvas": "^1.0.0-rc.5"}},+ "node_modules/keyv": {+ "version": "4.5.4",+ "resolved": "https://registry.npmjs.org/keyv/-/keyv-4.5.4.tgz",+ "integrity": "sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw==",+ "dev": true,+ "license": "MIT",+ "peer": true,+ "dependencies": {+ "json-buffer": "3.0.1"+ }+ },+ "node_modules/levn": {+ "version": "0.4.1",+ "resolved": "https://registry.npmjs.org/levn/-/levn-0.4.1.tgz",+ "integrity": "sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==",+ "dev": true,+ "license": "MIT",+ "peer": true,+ "dependencies": {+ "prelude-ls": "^1.2.1",+ "type-check": "~0.4.0"+ },+ "engines": {+ "node": ">= 0.8.0"+ }+ },+ "node_modules/locate-path": {+ "version": "6.0.0",+ "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz",+ "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==",+ "dev": true,+ "license": "MIT",+ "peer": true,+ "dependencies": {+ "p-locate": "^5.0.0"+ },+ "engines": {+ "node": ">=10"+ },+ "funding": {+ "url": "https://github.com/sponsors/sindresorhus"+ }+ },"node_modules/marked": {"version": "17.0.5","resolved": "https://registry.npmjs.org/marked/-/marked-17.0.5.tgz",@@ -1212,6 +1891,23 @@"node": ">= 20"}},+ "node_modules/minimatch": {+ "version": "10.2.4",+ "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-10.2.4.tgz",+ "integrity": "sha512-oRjTw/97aTBN0RHbYCdtF1MQfvusSIBQM0IZEgzl6426+8jSC0nF1a/GmnVLpfB9yyr6g6FTqWqiZVbxrtaCIg==",+ "dev": true,+ "license": "BlueOak-1.0.0",+ "peer": true,+ "dependencies": {+ "brace-expansion": "^5.0.2"+ },+ "engines": {+ "node": "18 || 20 || >=22"+ },+ "funding": {+ "url": "https://github.com/sponsors/isaacs"+ }+ },"node_modules/ms": {"version": "2.1.3","resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz",@@ -1237,12 +1933,95 @@"node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1"}},+ "node_modules/natural-compare": {+ "version": "1.4.0",+ "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz",+ "integrity": "sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==",+ "dev": true,+ "license": "MIT",+ "peer": true+ },+ "node_modules/optionator": {+ "version": "0.9.4",+ "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.4.tgz",+ "integrity": "sha512-6IpQ7mKUxRcZNLIObR0hz7lxsapSSIYNZJwXPGeF0mTVqGKFIXj1DQcMoT22S3ROcLyY/rz0PWaWZ9ayWmad9g==",+ "dev": true,+ "license": "MIT",+ "peer": true,+ "dependencies": {+ "deep-is": "^0.1.3",+ "fast-levenshtein": "^2.0.6",+ "levn": "^0.4.1",+ "prelude-ls": "^1.2.1",+ "type-check": "^0.4.0",+ "word-wrap": "^1.2.5"+ },+ "engines": {+ "node": ">= 0.8.0"+ }+ },+ "node_modules/p-limit": {+ "version": "3.1.0",+ "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz",+ "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==",+ "dev": true,+ "license": "MIT",+ "peer": true,+ "dependencies": {+ "yocto-queue": "^0.1.0"+ },+ "engines": {+ "node": ">=10"+ },+ "funding": {+ "url": "https://github.com/sponsors/sindresorhus"+ }+ },+ "node_modules/p-locate": {+ "version": "5.0.0",+ "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz",+ "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==",+ "dev": true,+ "license": "MIT",+ "peer": true,+ "dependencies": {+ "p-limit": "^3.0.2"+ },+ "engines": {+ "node": ">=10"+ },+ "funding": {+ "url": "https://github.com/sponsors/sindresorhus"+ }+ },"node_modules/pako": {"version": "2.1.0","resolved": "https://registry.npmjs.org/pako/-/pako-2.1.0.tgz","integrity": "sha512-w+eufiZ1WuJYgPXbV/PO3NCMEc3xqylkKHzp8bxp1uW4qaSNQUkwmLLEc3kKsfz8lpV1F8Ht3U1Cm+9Srog2ug==","license": "(MIT AND Zlib)"},+ "node_modules/path-exists": {+ "version": "4.0.0",+ "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz",+ "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==",+ "dev": true,+ "license": "MIT",+ "peer": true,+ "engines": {+ "node": ">=8"+ }+ },+ "node_modules/path-key": {+ "version": "3.1.1",+ "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz",+ "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==",+ "dev": true,+ "license": "MIT",+ "peer": true,+ "engines": {+ "node": ">=8"+ }+ },"node_modules/performance-now": {"version": "2.1.0","resolved": "https://registry.npmjs.org/performance-now/-/performance-now-2.1.0.tgz",@@ -1299,6 +2078,28 @@"node": "^10 || ^12 || >=14"}},+ "node_modules/prelude-ls": {+ "version": "1.2.1",+ "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz",+ "integrity": "sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==",+ "dev": true,+ "license": "MIT",+ "peer": true,+ "engines": {+ "node": ">= 0.8.0"+ }+ },+ "node_modules/punycode": {+ "version": "2.3.1",+ "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.1.tgz",+ "integrity": "sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==",+ "dev": true,+ "license": "MIT",+ "peer": true,+ "engines": {+ "node": ">=6"+ }+ },"node_modules/raf": {"version": "3.4.1","resolved": "https://registry.npmjs.org/raf/-/raf-3.4.1.tgz",@@ -1371,6 +2172,31 @@"fsevents": "~2.3.2"}},+ "node_modules/shebang-command": {+ "version": "2.0.0",+ "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz",+ "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==",+ "dev": true,+ "license": "MIT",+ "peer": true,+ "dependencies": {+ "shebang-regex": "^3.0.0"+ },+ "engines": {+ "node": ">=8"+ }+ },+ "node_modules/shebang-regex": {+ "version": "3.0.0",+ "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz",+ "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==",+ "dev": true,+ "license": "MIT",+ "peer": true,+ "engines": {+ "node": ">=8"+ }+ },"node_modules/socket.io-client": {"version": "4.8.3","resolved": "https://registry.npmjs.org/socket.io-client/-/socket.io-client-4.8.3.tgz",@@ -1455,6 +2281,31 @@"url": "https://github.com/sponsors/SuperchupuDev"}},+ "node_modules/type-check": {+ "version": "0.4.0",+ "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz",+ "integrity": "sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==",+ "dev": true,+ "license": "MIT",+ "peer": true,+ "dependencies": {+ "prelude-ls": "^1.2.1"+ },+ "engines": {+ "node": ">= 0.8.0"+ }+ },+ "node_modules/uri-js": {+ "version": "4.4.1",+ "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz",+ "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==",+ "dev": true,+ "license": "BSD-2-Clause",+ "peer": true,+ "dependencies": {+ "punycode": "^2.1.0"+ }+ },"node_modules/utrie": {"version": "1.0.2","resolved": "https://registry.npmjs.org/utrie/-/utrie-1.0.2.tgz",@@ -1539,6 +2390,34 @@}}},+ "node_modules/which": {+ "version": "2.0.2",+ "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz",+ "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==",+ "dev": true,+ "license": "ISC",+ "peer": true,+ "dependencies": {+ "isexe": "^2.0.0"+ },+ "bin": {+ "node-which": "bin/node-which"+ },+ "engines": {+ "node": ">= 8"+ }+ },+ "node_modules/word-wrap": {+ "version": "1.2.5",+ "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.5.tgz",+ "integrity": "sha512-BN22B5eaMMI9UMtjrGd5g5eCYPpCPDUy0FJXbYsaT5zYxjFOckS53SQDE3pWkVoWpHXVb3BrYcEN4Twa55B5cA==",+ "dev": true,+ "license": "MIT",+ "peer": true,+ "engines": {+ "node": ">=0.10.0"+ }+ },"node_modules/ws": {"version": "8.18.3","resolved": "https://registry.npmjs.org/ws/-/ws-8.18.3.tgz",@@ -1567,6 +2446,20 @@"engines": {"node": ">=0.4.0"}+ },+ "node_modules/yocto-queue": {+ "version": "0.1.0",+ "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz",+ "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==",+ "dev": true,+ "license": "MIT",+ "peer": true,+ "engines": {+ "node": ">=10"+ },+ "funding": {+ "url": "https://github.com/sponsors/sindresorhus"+ }}}}diff --git a/package.json b/package.jsonindex 81ab147332..07207565d8 100644--- a/package.json+++ b/package.json@@ -33,6 +33,7 @@"socket.io-client": "^4.8.3"},"devDependencies": {+ "eslint-plugin-no-unsanitized": "^4.1.5","vite": "^7.3.1"}}diff --git a/src/local_deep_research/web/static/js/collection_create.js b/src/local_deep_research/web/static/js/collection_create.jsindex 2d83c9c0ee..5091d4829e 100644--- a/src/local_deep_research/web/static/js/collection_create.js+++ b/src/local_deep_research/web/static/js/collection_create.js@@ -132,10 +132,10 @@ function showCreateResults(data) {html += `<p><strong>Collection created successfully!</strong></p>`;html += '<p>Your collection ID is: <strong>' + escapeHtml(data.collection.id) + '</strong></p>';html += '<div style="margin-top: 1rem;">';- html += `<a href="/library/collections/${data.collection.id}" class="ldr-btn-collections ldr-btn-collections-primary">`;+ html += `<a href="/library/collections/${encodeURIComponent(data.collection.id)}" class="ldr-btn-collections ldr-btn-collections-primary">`;html += '<i class="fas fa-folder-open"></i> View Collection';html += '</a>';- html += `<a href="/library/collections/${data.collection.id}/upload" class="ldr-btn-collections ldr-btn-collections-secondary" style="margin-left: 1rem;">`;+ html += `<a href="/library/collections/${encodeURIComponent(data.collection.id)}/upload" class="ldr-btn-collections ldr-btn-collections-secondary" style="margin-left: 1rem;">`;html += '<i class="fas fa-plus"></i> Upload Files';html += '</a>';html += '</div>';@@ -156,6 +156,7 @@ function showCreateResults(data) {html += '</div>';// bearer:disable javascript_lang_dangerous_insert_html+ // eslint-disable-next-line no-unsanitized/property -- audited 2026-03-28: variable built from escaped/numeric values aboveresultsDiv.innerHTML = html;resultsDiv.style.display = 'block';}diff --git a/src/local_deep_research/web/static/js/collection_details.js b/src/local_deep_research/web/static/js/collection_details.jsindex acaa9cba73..cc814b59dc 100644--- a/src/local_deep_research/web/static/js/collection_details.js+++ b/src/local_deep_research/web/static/js/collection_details.js@@ -86,10 +86,11 @@ function displayCollectionEmbeddingSettings() {if (collectionData.embedding_model) {// Collection has stored settings - display them// bearer:disable javascript_lang_dangerous_insert_html+ // eslint-disable-next-line no-unsanitized/property -- audited 2026-03-28: all interpolations use escapeHtml/esc, numeric coercion, or hardcoded stringsinfoContainer.innerHTML = `<div class="ldr-info-item"><span class="ldr-info-label">Provider:</span>- <span class="ldr-info-value">${getProviderLabel(collectionData.embedding_model_type)}</span>+ <span class="ldr-info-value">${escapeHtml(getProviderLabel(collectionData.embedding_model_type))}</span></div><div class="ldr-info-item"><span class="ldr-info-label">Model:</span>@@ -97,16 +98,16 @@ function displayCollectionEmbeddingSettings() {</div><div class="ldr-info-item"><span class="ldr-info-label">Chunk Size:</span>- <span class="ldr-info-value">${escapeHtml(collectionData.chunk_size || 'Not set')} ${collectionData.chunk_size ? 'characters' : ''}</span>+ <span class="ldr-info-value">${escapeHtml(String(collectionData.chunk_size || 'Not set'))} ${collectionData.chunk_size ? 'characters' : ''}</span></div><div class="ldr-info-item"><span class="ldr-info-label">Chunk Overlap:</span>- <span class="ldr-info-value">${escapeHtml(collectionData.chunk_overlap || 'Not set')} ${collectionData.chunk_overlap ? 'characters' : ''}</span>+ <span class="ldr-info-value">${escapeHtml(String(collectionData.chunk_overlap || 'Not set'))} ${collectionData.chunk_overlap ? 'characters' : ''}</span></div>${collectionData.embedding_dimension ? `<div class="ldr-info-item"><span class="ldr-info-label">Embedding Dimension:</span>- <span class="ldr-info-value">${escapeHtml(collectionData.embedding_dimension)}</span>+ <span class="ldr-info-value">${escapeHtml(String(collectionData.embedding_dimension))}</span></div>` : ''}${collectionData.splitter_type ? `@@ -136,7 +137,7 @@ function displayCollectionEmbeddingSettings() {${collectionData.index_file_size ? `<div class="ldr-info-item"><span class="ldr-info-label">Index File Size:</span>- <span class="ldr-info-value">${escapeHtml(collectionData.index_file_size)}</span>+ <span class="ldr-info-value">${escapeHtml(String(collectionData.index_file_size))}</span></div>` : ''}`;@@ -199,33 +200,34 @@ function renderDocuments() {container.style.display = 'block';noDocsMessage.style.display = 'none';+ // eslint-disable-next-line no-unsanitized/property -- audited 2026-03-28: all interpolations use escapeHtml/esc, numeric coercion, or hardcoded stringscontainer.innerHTML = filteredDocs.map(doc => `<div class="ldr-document-item ${doc.indexed ? 'indexed' : 'unindexed'}">- <a href="/library/document/${doc.id}" class="ldr-document-link" style="text-decoration: none; color: inherit; display: block; flex: 1;">+ <a href="/library/document/${encodeURIComponent(doc.id)}" class="ldr-document-link" style="text-decoration: none; color: inherit; display: block; flex: 1;"><div class="ldr-document-info"><div class="ldr-document-title">${escapeHtml(doc.filename)}${doc.has_pdf ? '<i class="fas fa-file-pdf" style="color: var(--error-color); margin-left: 8px;" title="PDF stored"></i>' : ''}${doc.has_text_db ? '<i class="fas fa-file-alt" style="color: var(--success-color); margin-left: 8px;" title="Text content available"></i>' : ''}- ${doc.in_other_collections ? `<i class="fas fa-link" style="color: var(--accent-primary); margin-left: 8px;" title="In ${doc.other_collections_count + 1} collections"></i>` : ''}+ ${doc.in_other_collections ? `<i class="fas fa-link" style="color: var(--accent-primary); margin-left: 8px;" title="In ${escapeHtml(String(doc.other_collections_count + 1))} collections"></i>` : ''}</div><div class="ldr-document-meta">${doc.file_size ? `Size: ${formatBytes(doc.file_size)} • ` : ''}- ${doc.source_type && doc.source_type !== 'unknown' ? `<span class="ldr-badge ldr-badge-info">${doc.source_type.replace('_', ' ')}</span> • ` : ''}+ ${doc.source_type && doc.source_type !== 'unknown' ? `<span class="ldr-badge ldr-badge-info">${escapeHtml(doc.source_type.replace('_', ' '))}</span> • ` : ''}${doc.indexed ?- `<span class="ldr-badge ldr-badge-success">Indexed (${doc.chunk_count} chunks)</span>` :+ `<span class="ldr-badge ldr-badge-success">Indexed (${escapeHtml(String(doc.chunk_count))} chunks)</span>` :'<span class="ldr-badge ldr-badge-warning">Not indexed</span>'}- ${doc.last_indexed_at ? ` • Last indexed: ${new Date(doc.last_indexed_at).toLocaleString()}` : ''}+ ${doc.last_indexed_at ? ` • Last indexed: ${escapeHtml(new Date(doc.last_indexed_at).toLocaleString())}` : ''}</div></div></a><div class="ldr-document-actions">- <button class="ldr-btn-remove-from-collection" onclick="event.stopPropagation(); removeDocumentFromCollection('${doc.id}')"+ <button class="ldr-btn-remove-from-collection" onclick="event.stopPropagation(); removeDocumentFromCollection('${escapeHtml(doc.id)}')"title="Remove from collection. ${doc.in_other_collections ? 'Document exists in other collections.' : 'Document will be deleted (not in other collections).'}"><i class="fas fa-unlink"></i></button>- <button class="ldr-btn-delete-doc" onclick="event.stopPropagation(); deleteDocumentCompletely('${doc.id}')"+ <button class="ldr-btn-delete-doc" onclick="event.stopPropagation(); deleteDocumentCompletely('${escapeHtml(doc.id)}')"title="Permanently delete this document, including PDF and text content. This cannot be undone."><i class="fas fa-trash"></i></button>diff --git a/src/local_deep_research/web/static/js/collection_upload.js b/src/local_deep_research/web/static/js/collection_upload.jsindex 004447cb75..029b553c34 100644--- a/src/local_deep_research/web/static/js/collection_upload.js+++ b/src/local_deep_research/web/static/js/collection_upload.js@@ -269,6 +269,7 @@ function showSelectedFiles(files) {const li = document.createElement('li');const fileSize = (file.size / 1024 / 1024).toFixed(2) + ' MB';// bearer:disable javascript_lang_dangerous_insert_html+ // eslint-disable-next-line no-unsanitized/property -- audited 2026-03-28: variable built from escaped/numeric values aboveli.innerHTML = `<i class="fas fa-file"></i><span>${escapeHtml(file.name)} (${fileSize})</span>@@ -512,6 +513,7 @@ function showBatchedProgress(files, totalBatches) {const totalSizeMB = (totalSize / (1024 * 1024)).toFixed(1);// bearer:disable javascript_lang_dangerous_insert_html+ // eslint-disable-next-line no-unsanitized/property -- audited 2026-03-28: variable built from escaped/numeric values aboveprogressDiv.innerHTML = `<div style="padding: 1.5rem; background: var(--bg-tertiary); border-radius: 8px;"><div style="display: flex; align-items: center; justify-content: space-between; margin-bottom: 1rem;">@@ -625,6 +627,7 @@ function showCleanProgress(files) {`;// bearer:disable javascript_lang_dangerous_insert_html+ // eslint-disable-next-line no-unsanitized/property -- audited 2026-03-28: variable built from escaped/numeric values aboveprogressDiv.innerHTML = html;progressDiv.style.display = 'block';}@@ -792,6 +795,7 @@ function showUploadResults(data) {html += '</div>';// bearer:disable javascript_lang_dangerous_insert_html+ // eslint-disable-next-line no-unsanitized/property -- audited 2026-03-28: variable built from escaped/numeric values aboveresultsDiv.innerHTML = html;resultsDiv.style.display = 'block';}diff --git a/src/local_deep_research/web/static/js/collections_manager.js b/src/local_deep_research/web/static/js/collections_manager.jsindex b460cfeb15..b519b0c70b 100644--- a/src/local_deep_research/web/static/js/collections_manager.js+++ b/src/local_deep_research/web/static/js/collections_manager.js@@ -123,8 +123,9 @@ async function loadCollections() {function renderCollections() {const container = document.getElementById('collections-container');+ // eslint-disable-next-line no-unsanitized/property -- audited 2026-03-28: all interpolations use escapeHtml/esc, numeric coercion, or hardcoded stringscontainer.innerHTML = collections.map(collection => `- <a href="/library/collections/${collection.id}" class="ldr-collection-card" data-id="${collection.id}" style="text-decoration: none; color: inherit; cursor: pointer;">+ <a href="/library/collections/${encodeURIComponent(collection.id)}" class="ldr-collection-card" data-id="${escapeHtml(collection.id)}" style="text-decoration: none; color: inherit; cursor: pointer;"><div class="ldr-collection-header"><h3>${escapeHtml(collection.name)}</h3>${collection.description ? `<p class="ldr-collection-description">${escapeHtml(collection.description)}</p>` : ''}diff --git a/src/local_deep_research/web/static/js/components/detail.js b/src/local_deep_research/web/static/js/components/detail.jsindex 12d639def6..af8e0c060c 100644--- a/src/local_deep_research/web/static/js/components/detail.js+++ b/src/local_deep_research/web/static/js/components/detail.js@@ -296,7 +296,7 @@<div class="search-engine-item"><div class="engine-name">${escapeHtml(engine.engine)}</div><div class="engine-stats">- <span class="stat">${engine.call_count} searches</span>+ <span class="stat">${Number(engine.call_count) || 0} searches</span><span class="stat">${engine.success_rate.toFixed(1)}% success</span><span class="stat">${(engine.avg_response_time / 1000).toFixed(2)}s avg</span><span class="stat">${formatNumber(engine.total_results)} results</span>@@ -305,6 +305,7 @@`).join('');// bearer:disable javascript_lang_dangerous_insert_html+ // eslint-disable-next-line no-unsanitized/property -- audited 2026-03-28: variable built from escaped/numeric values aboveengineContainer.innerHTML = engineHtml;}@@ -339,6 +340,7 @@}).join('');// bearer:disable javascript_lang_dangerous_insert_html+ // eslint-disable-next-line no-unsanitized/property -- audited 2026-03-28: variable built from escaped/numeric values abovetimelineContainer.innerHTML = timelineHtml;}@@ -638,10 +640,11 @@const item = document.createElement('div');item.className = 'ldr-phase-stat-item';// bearer:disable javascript_lang_dangerous_insert_html+ // eslint-disable-next-line no-unsanitized/property -- audited 2026-03-28: all interpolations use escapeHtml/esc, numeric coercion, or hardcoded stringsitem.innerHTML = `<div class="ldr-phase-name">${escapeHtml(phase)}</div><div class="ldr-phase-tokens">${formatNumber(stats.tokens)} tokens</div>- <div class="ldr-phase-calls">${stats.count} calls | ${stats.avg_response_time}ms avg</div>+ <div class="ldr-phase-calls">${Number(stats.count) || 0} calls | ${Number(stats.avg_response_time) || 0}ms avg</div>`;container.appendChild(item);});@@ -677,13 +680,14 @@const timestamp = item.timestamp ? new Date(item.timestamp).toLocaleTimeString() : 'Unknown time';// bearer:disable javascript_lang_dangerous_insert_html+ // eslint-disable-next-line no-unsanitized/property -- audited 2026-03-28: variable built from escaped/numeric values abovetrace.innerHTML = `<div style="display: flex; justify-content: space-between; align-items: center; margin-bottom: 0.5rem;"><div style="font-weight: 500; color: var(--text-primary);">${escapeHtml(item.calling_function || 'Unknown Function')}</div><div style="font-size: 0.875rem; color: var(--text-secondary);">- ${timestamp} - ${item.prompt_tokens || 0} in + ${item.completion_tokens || 0} out = ${item.tokens || 0} tokens, ${item.response_time_ms || 0}ms+ ${timestamp} - ${Number(item.prompt_tokens) || 0} in + ${Number(item.completion_tokens) || 0} out = ${Number(item.tokens) || 0} tokens, ${Number(item.response_time_ms) || 0}ms</div></div><div style="font-family: 'Courier New', monospace; font-size: 0.75rem; background: var(--bg-tertiary); padding: 0.5rem; border-radius: 4px; color: var(--text-secondary); overflow-x: auto; margin-bottom: 0.5rem;">diff --git a/src/local_deep_research/web/static/js/components/details.js b/src/local_deep_research/web/static/js/components/details.jsindex 977b8cbdc1..a4cb5c46bc 100644--- a/src/local_deep_research/web/static/js/components/details.js+++ b/src/local_deep_research/web/static/js/components/details.js@@ -160,6 +160,7 @@domainList.innerHTML = window.sanitizeHtml(domainHtml);} else if (window.escapeHtml) {// bearer:disable javascript_lang_dangerous_insert_html+ // eslint-disable-next-line no-unsanitized/property -- audited 2026-03-28: all interpolations use escapeHtml/esc, numeric coercion, or hardcoded stringsdomainList.innerHTML = domainHtml; // Already escaped individual fields above} else {domainList.textContent = 'Domain data unavailable (security module not loaded)';@@ -189,6 +190,7 @@resourceSample.innerHTML = window.sanitizeHtml(resourceHtml);} else {// bearer:disable javascript_lang_dangerous_insert_html+ // eslint-disable-next-line no-unsanitized/property -- audited 2026-03-28: all interpolations use escapeHtml/esc, numeric coercion, or hardcoded stringsresourceSample.innerHTML = resourceHtml; // Fields already escaped above}} else {@@ -560,6 +562,7 @@const item = document.createElement('div');item.className = 'ldr-phase-stat-item';// bearer:disable javascript_lang_dangerous_insert_html+ // eslint-disable-next-line no-unsanitized/property -- audited 2026-03-28: all interpolations use escapeHtml/esc, numeric coercion, or hardcoded stringsitem.innerHTML = `<div class="ldr-phase-name">${escapeHtml(phaseName)}</div><div class="ldr-phase-tokens">${formatNumber(stats.tokens)} tokens</div>@@ -596,6 +599,7 @@const item = document.createElement('div');item.className = 'ldr-search-engine-item';// bearer:disable javascript_lang_dangerous_insert_html+ // eslint-disable-next-line no-unsanitized/property -- audited 2026-03-28: all interpolations use escapeHtml/esc, numeric coercion, or hardcoded stringsitem.innerHTML = `<div class="ldr-search-engine-info"><div class="ldr-search-engine-name">${escapeHtml(call.engine || 'Unknown')}</div>@@ -1020,6 +1024,7 @@// Ensure truncated_count is a safe number before interpolationconst truncatedCount = Number(overview.truncated_count) || 0;// bearer:disable javascript_lang_dangerous_insert_html+ // eslint-disable-next-line no-unsanitized/property -- audited 2026-03-28: all interpolations use escapeHtml/esc, numeric coercion, or hardcoded stringstruncationStatus.innerHTML = `<span style="color: var(--error-color);">Yes (${truncatedCount} requests)</span>`;} else {truncationStatus.innerHTML = '<span style="color: var(--success-color);">No truncation</span>';@@ -1060,13 +1065,13 @@for (const [phase, stats] of Object.entries(phaseStats)) {const truncatedBadge = stats.truncated_count > 0- ? `<span class="ldr-badge ldr-badge-danger">${stats.truncated_count}</span>`+ ? `<span class="ldr-badge ldr-badge-danger">${Number(stats.truncated_count) || 0}</span>`: '<span class="ldr-badge ldr-badge-success">0</span>';html += `<tr><td>${escapeHtml(phase)}</td>- <td style="text-align: right;">${stats.count}</td>+ <td style="text-align: right;">${Number(stats.count) || 0}</td><td style="text-align: right;">${formatNumber(stats.prompt_tokens)}</td><td style="text-align: right;">${formatNumber(stats.completion_tokens)}</td><td style="text-align: right; font-weight: bold;">${formatNumber(stats.total_tokens)}</td>@@ -1078,6 +1083,7 @@html += '</tbody></table>';html += '</div>';// bearer:disable javascript_lang_dangerous_insert_html+ // eslint-disable-next-line no-unsanitized/property -- audited 2026-03-28: variable built from escaped/numeric values abovecontainer.innerHTML = html;}@@ -1096,7 +1102,7 @@const truncatedBadge = req.context_truncated? '<span class="ldr-badge ldr-badge-danger">Yes</span>': '<span class="ldr-badge ldr-badge-success">No</span>';- const responseTime = req.response_time_ms ? `${req.response_time_ms}ms` : 'N/A';+ const responseTime = req.response_time_ms ? `${Number(req.response_time_ms) || 0}ms` : 'N/A';html += `<tr>@@ -1114,6 +1120,7 @@});// bearer:disable javascript_lang_dangerous_insert_html+ // eslint-disable-next-line no-unsanitized/property -- audited 2026-03-28: variable built from escaped/numeric values abovetbody.innerHTML = html;}diff --git a/src/local_deep_research/web/static/js/components/fallback/ui.js b/src/local_deep_research/web/static/js/components/fallback/ui.jsindex ef7f98ba4a..0c1d6fd671 100644--- a/src/local_deep_research/web/static/js/components/fallback/ui.js+++ b/src/local_deep_research/web/static/js/components/fallback/ui.js@@ -37,6 +37,7 @@</div>`;// bearer:disable javascript_lang_dangerous_insert_html+ // eslint-disable-next-line no-unsanitized/property -- audited 2026-03-28: variable built from escaped/numeric values abovecontainer.innerHTML = spinnerHtml;}@@ -60,12 +61,14 @@SafeLogger.error(message);// Escape message to prevent XSS+ // eslint-disable-next-line no-unsanitized/property -- audited 2026-03-28: plugin bug — LogicalExpression callee (github.com/mozilla/eslint-plugin-no-unsanitized/issues/263)const escapedMessage = (window.escapeHtml || escapeHtmlFallback)(message);// Create a notification elementconst notification = document.createElement('div');notification.className = 'ldr-notification ldr-error';// bearer:disable javascript_lang_dangerous_insert_html+ // eslint-disable-next-line no-unsanitized/property -- audited 2026-03-28: variable built from escaped/numeric values abovenotification.innerHTML = `<i class="fas fa-exclamation-circle"></i><span>${escapedMessage}</span>@@ -105,12 +108,14 @@SafeLogger.log(message);// Escape message to prevent XSS+ // eslint-disable-next-line no-unsanitized/property -- audited 2026-03-28: plugin bug — LogicalExpression callee (github.com/mozilla/eslint-plugin-no-unsanitized/issues/263)const escapedMessage = (window.escapeHtml || escapeHtmlFallback)(message);// Create a notification elementconst notification = document.createElement('div');notification.className = 'ldr-notification ldr-success';// bearer:disable javascript_lang_dangerous_insert_html+ // eslint-disable-next-line no-unsanitized/property -- audited 2026-03-28: variable built from escaped/numeric values abovenotification.innerHTML = `<i class="fas fa-check-circle"></i><span>${escapedMessage}</span>diff --git a/src/local_deep_research/web/static/js/components/history.js b/src/local_deep_research/web/static/js/components/history.jsindex 5dff35d24a..07aea1b08c 100644--- a/src/local_deep_research/web/static/js/components/history.js+++ b/src/local_deep_research/web/static/js/components/history.js@@ -43,6 +43,7 @@</div>`;// bearer:disable javascript_lang_dangerous_insert_html+ // eslint-disable-next-line no-unsanitized/property -- audited 2026-03-28: variable built from escaped/numeric values abovecontainer.innerHTML = spinnerHtml;},@@ -303,6 +304,7 @@if (historyEmptyMessage) {historyEmptyMessage.style.display = 'block';} else {+ // eslint-disable-next-line no-unsanitized/property -- audited 2026-03-28: all interpolations use escapeHtml/esc, numeric coercion, or hardcoded stringshistoryContainer.innerHTML = `<div class="ldr-empty-state"><i class="fas fa-history ldr-empty-icon"></i>@@ -422,6 +424,7 @@` : '';// bearer:disable javascript_lang_dangerous_insert_html+ // eslint-disable-next-line no-unsanitized/property -- audited 2026-03-28: variable built from escaped/numeric values aboveitemEl.innerHTML = `<div class="ldr-history-item-header"><div class="ldr-history-item-title">${esc(displayTitle)}</div>@@ -491,6 +494,7 @@}// bearer:disable javascript_lang_dangerous_insert_html+ // eslint-disable-next-line no-unsanitized/property -- audited 2026-03-28: all interpolations use escapeHtml/esc, numeric coercion, or hardcoded stringsitemEl.innerHTML = `<div class="ldr-history-item-header"><div class="ldr-history-item-title">${esc(displayTitle)}</div>diff --git a/src/local_deep_research/web/static/js/components/library_search_ui.js b/src/local_deep_research/web/static/js/components/library_search_ui.jsindex 4ea910397b..48d64228a0 100644--- a/src/local_deep_research/web/static/js/components/library_search_ui.js+++ b/src/local_deep_research/web/static/js/components/library_search_ui.js@@ -272,6 +272,7 @@ function renderMergedLibraryResults(tiered, query) {var snippetDiv = document.createElement('div');snippetDiv.className = 'ldr-library-snippet';// bearer:disable javascript_lang_dangerous_insert_html+ // eslint-disable-next-line no-unsanitized/property -- audited 2026-03-28: all interpolations use escapeHtml/esc, numeric coercion, or hardcoded stringssnippetDiv.innerHTML = '<small class="text-muted"><i class="fas fa-brain" aria-hidden="true"></i> Matched content:</small>' +'<div>' + renderSnippet(entry.semanticMatch.snippet, query) + '</div>';var body = card.querySelector('.card-body');@@ -333,6 +334,7 @@ function postFilterSemanticResults(results) {function showSearchNotice(html) {if (searchNotice) {// bearer:disable javascript_lang_dangerous_insert_html+ // eslint-disable-next-line no-unsanitized/property -- audited 2026-03-28: generic helper — callers verified to pass sanitized HTML onlysearchNotice.innerHTML = html;searchNotice.style.display = 'block';}diff --git a/src/local_deep_research/web/static/js/components/results.js b/src/local_deep_research/web/static/js/components/results.jsindex 1fd09418d8..ea036b9e72 100644--- a/src/local_deep_research/web/static/js/components/results.js+++ b/src/local_deep_research/web/static/js/components/results.js@@ -625,6 +625,7 @@if (window.ui && window.ui.renderMarkdown) {const renderedHtml = window.ui.renderMarkdown(content);// bearer:disable javascript_lang_dangerous_insert_html+ // eslint-disable-next-line no-unsanitized/property -- audited 2026-03-28: renderMarkdown() sanitizes internally via DOMPurifyresultsContainer.innerHTML = renderedHtml;} else {// Fallback: escape content and display as preformatted text for security@@ -632,6 +633,7 @@SafeLogger.warn('Markdown rendering unavailable. Displaying as plaintext.');const escaped = (window.escapeHtml || escapeHtmlFallback)(content);// bearer:disable javascript_lang_dangerous_insert_html+ // eslint-disable-next-line no-unsanitized/property -- audited 2026-03-28: all interpolations use escapeHtml/esc, numeric coercion, or hardcoded stringsresultsContainer.innerHTML = `<div class="ldr-markdown-content"><div class="alert alert-warning" style="margin-bottom: 1rem;"><i class="fas fa-exclamation-triangle"></i> Markdown rendering unavailable. Displaying as plaintext.@@ -656,8 +658,10 @@* @param {string} message - Error message*/function showError(message) {+ // eslint-disable-next-line no-unsanitized/property -- audited 2026-03-28: plugin bug — LogicalExpression callee (github.com/mozilla/eslint-plugin-no-unsanitized/issues/263)const escapedMessage = (window.escapeHtml || escapeHtmlFallback)(message);// bearer:disable javascript_lang_dangerous_insert_html+ // eslint-disable-next-line no-unsanitized/property -- audited 2026-03-28: variable built from escaped/numeric values aboveresultsContainer.innerHTML = `<div class="alert alert-danger" role="alert"><i class="fas fa-exclamation-triangle"></i> ${escapedMessage}diff --git a/src/local_deep_research/web/static/js/components/semantic_search.js b/src/local_deep_research/web/static/js/components/semantic_search.jsindex cee4128e7a..632f6122a4 100644--- a/src/local_deep_research/web/static/js/components/semantic_search.js+++ b/src/local_deep_research/web/static/js/components/semantic_search.js@@ -190,6 +190,7 @@ function createSemanticResultCard(result, config, query) {}// bearer:disable javascript_lang_dangerous_insert_html+ // eslint-disable-next-line no-unsanitized/property -- audited 2026-03-28: all interpolations use escapeHtml/esc, numeric coercion, or hardcoded stringscard.innerHTML = `<div class="ldr-semantic-result-header"><div>diff --git a/src/local_deep_research/web/static/js/components/settings.js b/src/local_deep_research/web/static/js/components/settings.jsindex 54b06c8a51..5c0e355fd2 100644--- a/src/local_deep_research/web/static/js/components/settings.js+++ b/src/local_deep_research/web/static/js/components/settings.js@@ -1768,6 +1768,7 @@document.head.appendChild(style);}+ // eslint-disable-next-line no-unsanitized/property -- audited 2026-03-28: variable built from escaped/numeric values abovecontentElement.innerHTML = html;}).catch(error => {@@ -2062,6 +2063,7 @@}// Update the content+ // eslint-disable-next-line no-unsanitized/property -- audited 2026-03-28: variable built from escaped/numeric values abovesettingsContent.innerHTML = html;// Check if the element exists immediately after setting innerHTML@@ -2984,6 +2986,7 @@html = '<div id="filtered-settings-alert" class="ldr-settings-alert-container"></div>' + html;// Update the content+ // eslint-disable-next-line no-unsanitized/property -- audited 2026-03-28: variable built from escaped/numeric values abovesettingsContent.innerHTML = html;// Initialize accordion behavior - all expanded for search results@@ -4745,6 +4748,7 @@.finally(() => {// Re-enable button and restore original texttestBtn.disabled = false;+ // eslint-disable-next-line no-unsanitized/property -- audited 2026-03-28: variable built from escaped/numeric values abovetestBtn.innerHTML = originalText;});}diff --git a/src/local_deep_research/web/static/js/components/subscription-manager.js b/src/local_deep_research/web/static/js/components/subscription-manager.jsindex eb8afc5a68..a069f9077f 100644--- a/src/local_deep_research/web/static/js/components/subscription-manager.js+++ b/src/local_deep_research/web/static/js/components/subscription-manager.js@@ -123,6 +123,7 @@ class SubscriptionManager {const li = document.createElement('li');li.className = 'nav-item';// bearer:disable javascript_lang_dangerous_insert_html+ // eslint-disable-next-line no-unsanitized/property -- audited 2026-03-28: all interpolations use escapeHtml/esc, numeric coercion, or hardcoded stringsli.innerHTML = `<button class="nav-link" data-folder="${this.escapeHtml(folder.name)}" type="button">${this.escapeHtml(folder.icon || '📁')} ${this.escapeHtml(folder.name)}@@ -170,6 +171,7 @@ class SubscriptionManager {}// Render subscription cards+ // eslint-disable-next-line no-unsanitized/property -- audited 2026-03-28: all interpolations use escapeHtml/esc, numeric coercion, or hardcoded stringscontainer.innerHTML = subsToShow.map(sub => this.renderSubscriptionCard(sub)).join('');}@@ -179,7 +181,7 @@ class SubscriptionManager {const timeUntil = this.formatTimeUntil(nextRefresh - now);return `- <div class="subscription-card mb-3" data-subscription-id="${subscription.id}">+ <div class="subscription-card mb-3" data-subscription-id="${this.escapeHtml(subscription.id)}"><div class="d-flex justify-content-between align-items-start"><div class="flex-grow-1"><h6 class="mb-1">${this.escapeHtml(subscription.query_or_topic)}</h6>@@ -192,15 +194,15 @@ class SubscriptionManager {</div><div class="ldr-subscription-actions"><button class="btn btn-sm btn-outline-primary edit-subscription-btn"- data-subscription-id="${subscription.id}" title="Edit">+ data-subscription-id="${this.escapeHtml(subscription.id)}" title="Edit"><i class="bi bi-pencil"></i></button><button class="btn btn-sm btn-outline-warning pause-subscription-btn"- data-subscription-id="${subscription.id}" title="${subscription.status === 'active' ? 'Pause' : 'Resume'}">+ data-subscription-id="${this.escapeHtml(subscription.id)}" title="${subscription.status === 'active' ? 'Pause' : 'Resume'}"><i class="bi bi-${subscription.status === 'active' ? 'pause' : 'play'}"></i></button><button class="btn btn-sm btn-outline-danger delete-subscription-btn"- data-subscription-id="${subscription.id}" title="Delete">+ data-subscription-id="${this.escapeHtml(subscription.id)}" title="Delete"><i class="bi bi-trash"></i></button></div>@@ -269,6 +271,7 @@ class SubscriptionManager {if (existingModal) existingModal.remove();// bearer:disable javascript_lang_dangerous_insert_html+ // eslint-disable-next-line no-unsanitized/method -- audited 2026-03-28: variable built from escaped/numeric values abovedocument.body.insertAdjacentHTML('beforeend', modalHtml);// Set textarea value via DOM property (not innerHTML) to avoid entity encoding issuesdocument.getElementById('edit-notes').value = subscription.notes || '';diff --git a/src/local_deep_research/web/static/js/deletion/confirmation_modal.js b/src/local_deep_research/web/static/js/deletion/confirmation_modal.jsindex db701f3739..9c7fb030f0 100644--- a/src/local_deep_research/web/static/js/deletion/confirmation_modal.js+++ b/src/local_deep_research/web/static/js/deletion/confirmation_modal.js@@ -131,6 +131,7 @@ function showDeleteConfirmation(options) {// Set detailsif (detailsEl && detailsListEl) {if (options.details && options.details.length > 0) {+ // eslint-disable-next-line no-unsanitized/property -- audited 2026-03-28: all interpolations use escapeHtml/esc, numeric coercion, or hardcoded stringsdetailsListEl.innerHTML = options.details.map(d => `<li>${escapeHtml(d)}</li>`).join('');detailsEl.style.display = 'block';} else {diff --git a/src/local_deep_research/web/static/js/embedding_settings.js b/src/local_deep_research/web/static/js/embedding_settings.jsindex 13b084a43c..008a7a1981 100644--- a/src/local_deep_research/web/static/js/embedding_settings.js+++ b/src/local_deep_research/web/static/js/embedding_settings.js@@ -662,6 +662,7 @@ function updateProviderInfo() {});// bearer:disable javascript_lang_dangerous_insert_html+ // eslint-disable-next-line no-unsanitized/property -- audited 2026-03-28: variable built from escaped/numeric values aboveproviderInfo.innerHTML = infoHTML;}@@ -849,6 +850,7 @@ async function testConfiguration() {? '<br><i class="fas fa-info-circle"></i> <em>Slow response time may be due to initial model loading. Test again for a more accurate measurement.</em>': '';// bearer:disable javascript_lang_dangerous_insert_html+ // eslint-disable-next-line no-unsanitized/property -- audited 2026-03-28: all interpolations use escapeHtml/esc, numeric coercion, or hardcoded stringstestResult.innerHTML = `<div class="ldr-alert ldr-alert-success"><i class="fas fa-check-circle"></i> <strong>Test Passed!</strong><br>diff --git a/src/local_deep_research/web/static/js/followup.js b/src/local_deep_research/web/static/js/followup.jsindex bc1b3cfdca..7aede73ce3 100644--- a/src/local_deep_research/web/static/js/followup.js+++ b/src/local_deep_research/web/static/js/followup.js@@ -87,6 +87,7 @@ class FollowUpResearch {const modalHtml = await response.text();// bearer:disable javascript_lang_dangerous_insert_html+ // eslint-disable-next-line no-unsanitized/method -- audited 2026-03-28: static template file fetched from app's own static assetsdocument.body.insertAdjacentHTML('beforeend', modalHtml);this.modalElement = document.getElementById('followUpModal');this.attachModalEventHandlers();@@ -196,6 +197,7 @@ class FollowUpResearch {}</style>`;+ // eslint-disable-next-line no-unsanitized/method -- audited 2026-03-28: pure hardcoded CSS string literal with no interpolationsdocument.head.insertAdjacentHTML('beforeend', styles);}}diff --git a/src/local_deep_research/web/static/js/mobile-navigation.js b/src/local_deep_research/web/static/js/mobile-navigation.jsindex eafbfce8f7..6c67ad2d50 100644--- a/src/local_deep_research/web/static/js/mobile-navigation.js+++ b/src/local_deep_research/web/static/js/mobile-navigation.js@@ -110,6 +110,7 @@{ id: 'more', icon: 'fas fa-bars', label: 'More', action: 'sheet' }];+ // eslint-disable-next-line no-unsanitized/property -- audited 2026-03-28: all values are hardcoded constants from tabs array and URLS confignav.innerHTML = tabs.map(tab => `<button class="ldr-mobile-nav-tab ${this.isCurrentPage(tab) ? 'active' : ''}"data-tab-id="${tab.id}"@@ -137,6 +138,7 @@const username = this.getUsername();// bearer:disable javascript_lang_dangerous_insert_html+ // eslint-disable-next-line no-unsanitized/property -- audited 2026-03-28: all values are hardcoded constants from tabs array and URLS configsheet.innerHTML = `<div class="ldr-mobile-sheet-handle" aria-label="Drag to dismiss"></div>diff --git a/src/local_deep_research/web/static/js/pages/news.js b/src/local_deep_research/web/static/js/pages/news.jsindex bf076c1ea5..d0c8593e5b 100644--- a/src/local_deep_research/web/static/js/pages/news.js+++ b/src/local_deep_research/web/static/js/pages/news.js@@ -906,6 +906,7 @@ function renderNewsItems(searchQuery = null) {const hasFilters = filterMessage.length > 0;const filterText = hasFilters ? ` matching ${filterMessage.join(', ')}` : '';+ // eslint-disable-next-line no-unsanitized/property -- audited 2026-03-28: all interpolations use escapeHtml/esc, numeric coercion, or hardcoded stringscontainer.innerHTML = `<div class="ldr-empty-state"><i class="fas fa-newspaper"></i>@@ -1223,8 +1224,10 @@ async function loadVotesForNewsItems() {if (upBtn && downBtn) {// Update vote counts (ensure numeric values to prevent XSS)// bearer:disable javascript_lang_dangerous_insert_html+ // eslint-disable-next-line no-unsanitized/property -- audited 2026-03-28: all interpolations use escapeHtml/esc, numeric coercion, or hardcoded stringsupBtn.innerHTML = `<i class="fas fa-thumbs-up"></i> ${Number(voteInfo.upvotes) || 0}`;// bearer:disable javascript_lang_dangerous_insert_html+ // eslint-disable-next-line no-unsanitized/property -- audited 2026-03-28: all interpolations use escapeHtml/esc, numeric coercion, or hardcoded stringsdownBtn.innerHTML = `<i class="fas fa-thumbs-down"></i> ${Number(voteInfo.downvotes) || 0}`;// Show user's existing vote@@ -1271,8 +1274,10 @@ async function vote(newsId, voteType) {const downBtn = item.querySelector('.ldr-vote-btn:last-child');// Ensure numeric values to prevent XSS// bearer:disable javascript_lang_dangerous_insert_html+ // eslint-disable-next-line no-unsanitized/property -- audited 2026-03-28: all interpolations use escapeHtml/esc, numeric coercion, or hardcoded stringsupBtn.innerHTML = `<i class="fas fa-thumbs-up"></i> ${Number(data.upvotes) || 0}`;// bearer:disable javascript_lang_dangerous_insert_html+ // eslint-disable-next-line no-unsanitized/property -- audited 2026-03-28: all interpolations use escapeHtml/esc, numeric coercion, or hardcoded stringsdownBtn.innerHTML = `<i class="fas fa-thumbs-down"></i> ${Number(data.downvotes) || 0}`;if (voteType === 'up') {@@ -1418,6 +1423,7 @@ function toggleExpanded(newsId) {const toggleBtn = newsItem.querySelector('.ldr-expand-toggle-btn');if (toggleBtn) {const isExpanded = expandedNewsIds.has(newsId);+ // eslint-disable-next-line no-unsanitized/property -- audited 2026-03-28: all interpolations use escapeHtml/esc, numeric coercion, or hardcoded stringstoggleBtn.innerHTML = `<i class="bi bi-chevron-${isExpanded ? 'up' : 'down'}"></i>${isExpanded ? 'Show less' : 'Show more'}@@ -1554,6 +1560,7 @@ function extractTrendingTopics() {if (topTopics.length === 0) {container.innerHTML = '<div class="text-muted small">No trending topics available</div>';} else {+ // eslint-disable-next-line no-unsanitized/property -- audited 2026-03-28: all interpolations use escapeHtml/esc, numeric coercion, or hardcoded stringscontainer.innerHTML = topTopics.map(([topic, count]) =>`<span class="ldr-topic-tag" data-topic="${escapeHtml(topic)}" title="Click to filter by ${escapeHtml(topic)} (${count} occurrences)">${escapeHtml(topic)} <span class="ldr-topic-count">${count}</span>@@ -1658,6 +1665,7 @@ function updateBulkActionsBar() {const bulkBar = document.createElement('div');bulkBar.className = 'ldr-bulk-actions-bar';// bearer:disable javascript_lang_dangerous_insert_html+ // eslint-disable-next-line no-unsanitized/property -- audited 2026-03-28: variable built from escaped/numeric values abovebulkBar.innerHTML = `<div class="ldr-bulk-actions-content"><div class="ldr-news-stats">@@ -1730,6 +1738,7 @@ function updateFilterStatusBar() {</button></div>`;// bearer:disable javascript_lang_dangerous_insert_html+ // eslint-disable-next-line no-unsanitized/property -- audited 2026-03-28: all interpolations use escapeHtml/esc, numeric coercion, or hardcoded stringsfilterBar.innerHTML = filterHtml;feedHeader.appendChild(filterBar);}@@ -1810,7 +1819,7 @@ function renderSourceLinks(links) {return `<a href="${safeHref(link.url)}" target="_blank" rel="noopener noreferrer" class="ldr-source-link" title="${escapeHtml(link.title)}"><i class="bi bi-link-45deg"></i>- ${displayText}+ ${escapeHtml(displayText)}</a>`;}).join('');@@ -1844,7 +1853,7 @@ async function showSubscriptionHistory(subscriptionId) {<div class="ldr-history-query">${escapeHtml(item.query)}</div><div class="ldr-history-actions"><a href="${safeHref(item.url)}" class="btn btn-sm btn-primary">View Results</a>- ${item.duration_seconds ? `<span class="ldr-duration">${item.duration_seconds}s</span>` : ''}+ ${item.duration_seconds ? `<span class="ldr-duration">${Number(item.duration_seconds) || 0}s</span>` : ''}</div></div>`).join('');@@ -1868,11 +1877,11 @@ async function showSubscriptionHistory(subscriptionId) {<div class="ldr-subscription-stats mb-3"><span class="ldr-stat-item"><i class="bi bi-arrow-repeat"></i>- ${data.subscription.refresh_count} refreshes+ ${Number(data.subscription.refresh_count) || 0} refreshes</span><span class="ldr-stat-item"><i class="bi bi-clock"></i>- Every ${data.subscription.refresh_interval_minutes} min+ Every ${Number(data.subscription.refresh_interval_minutes) || 0} min</span><span class="ldr-stat-item"><i class="bi bi-calendar"></i>@@ -1894,6 +1903,7 @@ async function showSubscriptionHistory(subscriptionId) {// Add modal to page// bearer:disable javascript_lang_dangerous_insert_html+ // eslint-disable-next-line no-unsanitized/method -- audited 2026-03-28: HTML variable built with escaped valuesdocument.body.insertAdjacentHTML('beforeend', modalHtml);// Show modal@@ -2418,6 +2428,7 @@ function updateRefreshIndicator() {const autoRefreshLabel = document.querySelector('label[for="auto-refresh"]');if (autoRefreshLabel) {// bearer:disable javascript_lang_dangerous_insert_html+ // eslint-disable-next-line no-unsanitized/property -- audited 2026-03-28: all interpolations use escapeHtml/esc, numeric coercion, or hardcoded stringsautoRefreshLabel.innerHTML = `<i class="bi bi-arrow-clockwise"></i> Auto-refresh (${countdownText})`;}}@@ -2452,6 +2463,7 @@ async function monitorResearch(researchId, query = null) {newCard.className = 'ldr-news-card ldr-priority-high ldr-active-research-card';newCard.setAttribute('data-research-id', researchId);// bearer:disable javascript_lang_dangerous_insert_html+ // eslint-disable-next-line no-unsanitized/property -- audited 2026-03-28: all interpolations use escapeHtml/esc, numeric coercion, or hardcoded stringsnewCard.innerHTML = `<div class="ldr-news-header"><h2 class="ldr-news-title">@@ -2464,8 +2476,8 @@ async function monitorResearch(researchId, query = null) {<span><i class="bi bi-clock"></i> ${statusData.status === 'in_progress' ? 'In progress' : 'Started just now'}</span></div><div class="ldr-news-summary">- <div class="progress" role="progressbar" aria-valuemin="0" aria-valuemax="100" aria-valuenow="${statusData.progress || 10}" aria-label="Research progress">- <div class="progress-bar progress-bar-striped progress-bar-animated" style="width: ${statusData.progress || 10}%"></div>+ <div class="progress" role="progressbar" aria-valuemin="0" aria-valuemax="100" aria-valuenow="${Number(statusData.progress) || 10}" aria-label="Research progress">+ <div class="progress-bar progress-bar-striped progress-bar-animated" style="width: ${Number(statusData.progress) || 10}%"></div></div><p class="mt-2">${escapeHtml(statusData.message || 'Searching for breaking news and analyzing importance...')}</p></div>@@ -3539,6 +3551,7 @@ function showNewsSubscriptionModal(query = '', templateName = '') {</div></div>`;+ // eslint-disable-next-line no-unsanitized/method -- audited 2026-03-28: HTML variable built with escaped valuesdocument.body.insertAdjacentHTML('beforeend', modalHtml);// Set up form submission handlerdiff --git a/src/local_deep_research/web/static/js/pages/subscriptions.js b/src/local_deep_research/web/static/js/pages/subscriptions.jsindex 78a9e534a9..ab2a57c997 100644--- a/src/local_deep_research/web/static/js/pages/subscriptions.js+++ b/src/local_deep_research/web/static/js/pages/subscriptions.js@@ -163,6 +163,7 @@ function renderSubscriptions() {return;}+ // eslint-disable-next-line no-unsanitized/property -- audited 2026-03-28: all interpolations use escapeHtml/esc, numeric coercion, or hardcoded stringsgrid.innerHTML = filtered.map(sub => createSubscriptionCard(sub)).join('');}@@ -206,23 +207,23 @@ function createSubscriptionCard(subscription) {const safeQuery = escapeHtml(subscription.query);return `- <div class="ldr-subscription-card" data-subscription-id="${subscription.id}" onclick="viewSubscriptionHistory('${subscription.id}')" style="cursor: pointer;">+ <div class="ldr-subscription-card" data-subscription-id="${escapeHtml(subscription.id)}" onclick="viewSubscriptionHistory('${escapeHtml(subscription.id)}')" style="cursor: pointer;"><div class="ldr-card-header"><h4 title="${safeDisplayName}">${safeTruncatedName}</h4><div class="ldr-card-actions">- <button class="btn btn-sm ldr-btn-icon" onclick="event.stopPropagation(); runSubscriptionNow('${subscription.id}')" title="Run now">+ <button class="btn btn-sm ldr-btn-icon" onclick="event.stopPropagation(); runSubscriptionNow('${escapeHtml(subscription.id)}')" title="Run now"><i class="bi bi-arrow-clockwise"></i></button>- <button class="btn btn-sm ldr-btn-icon" onclick="event.stopPropagation(); toggleSubscription('${subscription.id}')" title="${statusClass === 'active' ? 'Pause' : 'Resume'}">+ <button class="btn btn-sm ldr-btn-icon" onclick="event.stopPropagation(); toggleSubscription('${escapeHtml(subscription.id)}')" title="${statusClass === 'active' ? 'Pause' : 'Resume'}"><i class="bi ${statusIcon}"></i></button>- <button class="btn btn-sm ldr-btn-icon" onclick="event.stopPropagation(); viewSubscriptionHistory('${subscription.id}')" title="View history">+ <button class="btn btn-sm ldr-btn-icon" onclick="event.stopPropagation(); viewSubscriptionHistory('${escapeHtml(subscription.id)}')" title="View history"><i class="bi bi-clock-history"></i></button>- <a href="/news/subscriptions/${subscription.id}/edit" class="btn btn-sm ldr-btn-icon" onclick="event.stopPropagation();" title="Edit">+ <a href="/news/subscriptions/${encodeURIComponent(subscription.id)}/edit" class="btn btn-sm ldr-btn-icon" onclick="event.stopPropagation();" title="Edit"><i class="bi bi-pencil"></i></a>- <button class="btn btn-sm ldr-btn-icon btn-danger" onclick="event.stopPropagation(); deleteSubscriptionDirect('${subscription.id}')" title="Delete">+ <button class="btn btn-sm ldr-btn-icon btn-danger" onclick="event.stopPropagation(); deleteSubscriptionDirect('${escapeHtml(subscription.id)}')" title="Delete"><i class="bi bi-trash"></i></button></div>@@ -242,7 +243,7 @@ function createSubscriptionCard(subscription) {${subscription.source_id ? `<div class="ldr-stat-item"><i class="bi bi-link-45deg"></i>- <a href="/progress/${subscription.source_id}" class="ldr-source-link">View original research</a>+ <a href="/progress/${encodeURIComponent(subscription.source_id)}" class="ldr-source-link">View original research</a></div>` : ''}</div>@@ -442,7 +443,7 @@ function showSubscriptionHistoryModal(subscription, historyData) {<p><strong>Created:</strong> ${new Date(subscription.created_at).toLocaleString()}</p>${subscription.source_id ? `<p><strong>Created from:</strong>- <a href="/progress/${subscription.source_id}" target="_blank">+ <a href="/progress/${encodeURIComponent(subscription.source_id)}" target="_blank">Original research <i class="bi bi-box-arrow-up-right"></i></a></p>@@ -461,7 +462,7 @@ function showSubscriptionHistoryModal(subscription, historyData) {return `<div class="ldr-history-item"><div class="ldr-history-item-header">- <a href="/progress/${item.research_id}" target="_blank">+ <a href="/progress/${encodeURIComponent(item.research_id)}" target="_blank">${safeHeadline} <i class="bi bi-box-arrow-up-right"></i></a><span class="ldr-history-date">${new Date(item.created_at).toLocaleString()}</span>@@ -494,6 +495,7 @@ function showSubscriptionHistoryModal(subscription, historyData) {// Add modal to page// bearer:disable javascript_lang_dangerous_insert_html+ // eslint-disable-next-line no-unsanitized/method -- audited 2026-03-28: variable built from escaped/numeric values abovedocument.body.insertAdjacentHTML('beforeend', modalContent);// Show modal@@ -566,7 +568,7 @@ function renderFolders() {document.querySelectorAll('.ldr-folder-item[data-folder]:not([data-folder="all"]):not([data-folder="uncategorized"])').forEach(el => el.remove());const dynamicFolders = folders.map(folder => `- <div class="ldr-folder-item" data-folder="${folder.id}">+ <div class="ldr-folder-item" data-folder="${escapeHtml(folder.id)}"><i class="bi bi-folder"></i> ${escapeHtml(folder.name)}<span class="ldr-folder-count">${countSubscriptionsInFolder(folder.id)}</span></div>@@ -581,6 +583,7 @@ function renderFolders() {const uncategorizedFolder = document.querySelector('[data-folder="uncategorized"]');if (dynamicFolders) {// bearer:disable javascript_lang_dangerous_insert_html+ // eslint-disable-next-line no-unsanitized/method -- audited 2026-03-28: variable built from escaped/numeric values aboveuncategorizedFolder.insertAdjacentHTML('afterend', dynamicFolders);}@@ -665,10 +668,12 @@ function showAlert(message, type) {alertDiv.className = `alert alert-${type} alert-dismissible fade show`;// Sanitize message: allows safe HTML tags (links, lists) while stripping dangerous ones// bearer:disable javascript_lang_dangerous_insert_html+ /* eslint-disable no-unsanitized/property -- audited 2026-03-28: plugin bug — LogicalExpression callee (github.com/mozilla/eslint-plugin-no-unsanitized/issues/263) */alertDiv.innerHTML = `${(window.sanitizeHtml || escapeHtml)(message)}<button type="button" class="btn-close" data-bs-dismiss="alert"></button>`;+ /* eslint-enable no-unsanitized/property */const container = document.querySelector('.ldr-page-header');container.insertAdjacentElement('afterend', alertDiv);diff --git a/src/local_deep_research/web/static/js/research_form.js b/src/local_deep_research/web/static/js/research_form.jsindex 19486aa79b..aafcfb15a2 100644--- a/src/local_deep_research/web/static/js/research_form.js+++ b/src/local_deep_research/web/static/js/research_form.js@@ -314,6 +314,7 @@ function displayWarnings(warnings) {}).join('');// bearer:disable javascript_lang_dangerous_insert_html+ // eslint-disable-next-line no-unsanitized/property -- audited 2026-03-28: variable built from escaped/numeric values abovealertContainer.innerHTML = warningsHtml;alertContainer.style.display = 'block';}diff --git a/src/local_deep_research/web/static/js/security/xss-protection.js b/src/local_deep_research/web/static/js/security/xss-protection.jsindex 656a2d80ef..a6f8fed487 100644--- a/src/local_deep_research/web/static/js/security/xss-protection.js+++ b/src/local_deep_research/web/static/js/security/xss-protection.js@@ -142,6 +142,7 @@ function safeSetInnerHTML(element, content, allowHtmlTags = false) {// Use DOMPurify for secure HTML sanitizationconst sanitized = DOMPurify.sanitize(contentString, SANITIZE_CONFIG);// bearer:disable javascript_lang_dangerous_insert_html+ // eslint-disable-next-line no-unsanitized/property -- audited 2026-03-28: content already sanitized by DOMPurify.sanitize() aboveelement.innerHTML = sanitized; // bearer:disable javascript_lang_dangerous_insert_html - Already sanitized by DOMPurify} else if (allowHtmlTags) {// DOMPurify not available but HTML requested - escape all HTML for safetydiff --git a/src/local_deep_research/web/static/js/services/pdf.js b/src/local_deep_research/web/static/js/services/pdf.jsindex a1cab602b5..f5341da0c7 100644--- a/src/local_deep_research/web/static/js/services/pdf.js+++ b/src/local_deep_research/web/static/js/services/pdf.js@@ -874,6 +874,7 @@ async function downloadPdf(titleOrData, content, metadata = {}) {// Use DOM-based HTML stripping for security (prevents XSS)const tempDiv = document.createElement('div');// bearer:disable javascript_lang_dangerous_insert_html+ // eslint-disable-next-line no-unsanitized/property -- audited 2026-03-28: detached div used only for textContent extraction, never renderedtempDiv.innerHTML = pdfContent;pdfContent = (tempDiv.textContent || tempDiv.innerText || '').replace(/ /gi, ' ')diff --git a/src/local_deep_research/web/static/js/services/socket.js b/src/local_deep_research/web/static/js/services/socket.jsindex 6ec7f0fee5..e7904c82ed 100644--- a/src/local_deep_research/web/static/js/services/socket.js+++ b/src/local_deep_research/web/static/js/services/socket.js@@ -780,6 +780,7 @@ window.socket = (function() {const escapeHtml = window.escapeHtml || escapeHtmlFallback;const typeText = type === 'all' ? '' : escapeHtml(type) + ' ';// bearer:disable javascript_lang_dangerous_insert_html+ // eslint-disable-next-line no-unsanitized/property -- audited 2026-03-28: all interpolations use escapeHtml/esc, numeric coercion, or hardcoded stringslogContainer.innerHTML = `<div class="ldr-empty-log-message">No ${typeText}logs available.</div>` + logContainer.innerHTML;} else if (visibleEntries.length > 0 && emptyMessage) {emptyMessage.remove();@@ -944,6 +945,7 @@ if (!window.addConsoleLog) {// Create log content with XSS protectionconst escapeHtml = window.escapeHtml || escapeHtmlFallback;// bearer:disable javascript_lang_dangerous_insert_html+ // eslint-disable-next-line no-unsanitized/property -- audited 2026-03-28: all interpolations use escapeHtml/esc, numeric coercion, or hardcoded stringsentry.innerHTML = `<span class="ldr-log-timestamp">${new Date().toLocaleTimeString()}</span><span class="ldr-log-badge">${escapeHtml(level.charAt(0).toUpperCase() + level.slice(1))}</span>diff --git a/src/local_deep_research/web/static/js/services/theme.js b/src/local_deep_research/web/static/js/services/theme.jsindex 11c489a5f1..7b4bd50465 100644--- a/src/local_deep_research/web/static/js/services/theme.js+++ b/src/local_deep_research/web/static/js/services/theme.js@@ -277,6 +277,7 @@// Show icon for CURRENT theme (what's active now)const currentIcon = THEMES[effectiveTheme]?.icon || 'fa-palette';// bearer:disable javascript_lang_dangerous_insert_html+ // eslint-disable-next-line no-unsanitized/property -- audited 2026-03-28: currentIcon from internal THEMES config object, not user inputquickToggle.innerHTML = `<i class="fas ${currentIcon}"></i>`;// Set tooltip for next theme in cyclediff --git a/src/local_deep_research/web/static/js/services/ui.js b/src/local_deep_research/web/static/js/services/ui.jsindex b94c418530..5dd0cb66f4 100644--- a/src/local_deep_research/web/static/js/services/ui.js+++ b/src/local_deep_research/web/static/js/services/ui.js@@ -23,6 +23,7 @@ function safeSetHTML(element, html, level) {} else {// For controlled content (UI elements we generate), direct assignment is acceptable// bearer:disable javascript_lang_dangerous_insert_html+ // eslint-disable-next-line no-unsanitized/property -- audited 2026-03-28: DOMPurify fallback path — callers use safeSetHTML which documents sanitization requirementelement.innerHTML = html;}}