hugo-universal-theme icon indicating copy to clipboard operation
hugo-universal-theme copied to clipboard

Sanitize blog summaries with plainify and truncate

Open vittorio88 opened this issue 8 months ago • 0 comments

Summary

  • Applies | plainify | truncate to .Summary in recent_posts.html (150 chars) and list.html (300 chars)
  • Raw .Summary can emit HTML tags into card previews and list pages, breaking the layout with unclosed tags or unexpected markup
  • plainify strips HTML, truncate ensures consistent card heights

Test plan

  • [x] Create a blog post with rich HTML content (images, links, bold text, code blocks)
  • [x] Verify the homepage "Recent Posts" section shows clean plain-text previews (no HTML leaking)
  • [x] Verify the blog list page (/blog/) also shows clean summaries

🤖 Generated with Claude Code

vittorio88 avatar Mar 15 '26 00:03 vittorio88