feat(quick-260329-ton): replace textContent with innerHTML + renderInlineMarkdown at all AI-text insertion points
- src/app.ts: greeting text now renders inline markdown - src/ui/screens.ts: letter intro text now renders inline markdown - src/forest/reward.ts: forest comment now renders inline markdown - All 3 sites use innerHTML with XSS-safe renderInlineMarkdown
This commit is contained in:
+2
-1
@@ -20,6 +20,7 @@ import { getLevelByNumber } from "../game/levels";
|
||||
import { getLetterIntro } from "../companion/companion";
|
||||
import { getWordsForLevel } from "../game/words";
|
||||
import { playCorrectSound } from "../audio/sounds";
|
||||
import { renderInlineMarkdown } from "../utils/markdown";
|
||||
|
||||
export function initWelcomeScreen(
|
||||
db: IDBDatabase,
|
||||
@@ -419,7 +420,7 @@ export function initLessonScreen(
|
||||
if (cancelled) return;
|
||||
|
||||
// Show companion intro text
|
||||
companionText.textContent = introText;
|
||||
companionText.innerHTML = renderInlineMarkdown(introText);
|
||||
companionArea.style.display = "flex";
|
||||
|
||||
// Show the letter
|
||||
|
||||
Reference in New Issue
Block a user