style/security: эмодзи→SVG, safeUrl в ассистенте, prefs в localStorage (Спринт3)

- Убраны эмодзи (правило: только inline SVG .ic): classes.html 🃏→layers,
  collection-rb.html →star, pet.html 😋/😢→текст (textContent не держит SVG).
- assistant.js: safeUrl() на динамических href (FAQ/поиск/RAG/правила) —
  блокирует javascript:/data:, пропускает /… и https://….
- LS.prefs: персистентность через localStorage (раньше sync был отключён,
  настройки терялись при перезагрузке). Грузим синхронно + flush на pagehide.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
Maxim Dolgolyov
2026-06-12 23:00:49 +03:00
parent ccfb151eca
commit 21cea72874
5 changed files with 21 additions and 29 deletions
+1 -1
View File
@@ -717,7 +717,7 @@
</label>
<label style="display:flex;align-items:center;gap:10px;cursor:pointer;font-size:0.85rem;font-weight:600;color:var(--text-1)">
<input type="checkbox" id="feat-collection" style="width:16px;height:16px;accent-color:var(--violet);cursor:pointer">
🃏 Коллекция
<svg class="ic" viewBox="0 0 24 24"><path d="m12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83Z"/><path d="m22 17.65-9.17 4.16a2 2 0 0 1-1.66 0L2 17.65"/><path d="m22 12.65-9.17 4.16a2 2 0 0 1-1.66 0L2 12.65"/></svg> Коллекция
</label>
<label style="display:flex;align-items:center;gap:10px;cursor:pointer;font-size:0.85rem;font-weight:600;color:var(--text-1)">
<input type="checkbox" id="feat-hangman" style="width:16px;height:16px;accent-color:var(--violet);cursor:pointer">