From e06a887da1dc511522225bc78542cf1ef113017f Mon Sep 17 00:00:00 2001 From: ddidderr Date: Thu, 21 May 2026 21:56:42 +0200 Subject: [PATCH] fix(ui): strip literal br tags from game descriptions Some ETI game descriptions include the literal string
in metadata. React renders descriptions as text, so the marker appears to users instead of being treated as a line break. Strip only the exact
token at the detail modal boundary. This keeps the fix UI-only and avoids treating descriptions as HTML or normalizing any other markup-like text. Test Plan: - just frontend-test - git diff --check Refs: none --- .../src/components/modals/GameDetailModal.tsx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/crates/lanspread-tauri-deno-ts/src/components/modals/GameDetailModal.tsx b/crates/lanspread-tauri-deno-ts/src/components/modals/GameDetailModal.tsx index 1047125..880326e 100644 --- a/crates/lanspread-tauri-deno-ts/src/components/modals/GameDetailModal.tsx +++ b/crates/lanspread-tauri-deno-ts/src/components/modals/GameDetailModal.tsx @@ -50,6 +50,8 @@ export const GameDetailModal = ({ onViewFiles, }: Props) => { const tags = tagsFromGame(game); + // Some game metadata contains a literal
; keep sanitization exact. + const description = game.description.split('
').join(''); const canRemoveDownload = game.downloaded && !game.installed && !isInProgress(game.install_status); @@ -102,8 +104,8 @@ export const GameDetailModal = ({ - {game.description && ( -

{game.description}

+ {description && ( +

{description}

)} {game.status_message && (