strip embedded HTML from garden item summaries
Created by: jedmund
Summary
- Garden detail pages were showing literal
<br>,<br><br>, and<i>...</i>tags inside the summary blurb (most visible on AniList-imported manga like Fullmetal Alchemist) because the field was rendered as escaped text. - Adds a
cleanSummaryhelper insrc/lib/utils/content.tsthat converts<br>to newlines, strips remaining tags, decodes the common HTML entities, and collapses extra whitespace. - Wires it into
src/routes/garden/[category]/[slug]/+page.sveltevia a$derivedvalue. Existing markup and CSS (white-space: pre-line+-webkit-line-clamp: 3) are unchanged, so the "Read more" toggle still works and\n\nseparators render as visible paragraph breaks.
No DB migration or import-side changes — render-time cleanup only.
Test plan
-
npm run dev, open the Fullmetal Alchemist garden item: no literal<br>/<i>visible;(Source: VIZ Media)andNote: ...blocks separated by blank lines; "Read more" expands/collapses. -
Spot-check a non-manga item (movie/book) — plaintext summaries render unchanged. -
npm run checkandnpm run lintpass.