Skip to content

v3.1.1

Choose a tag to compare

@github-actions github-actions released this 30 Oct 11:06
· 73 commits to main since this release
b16f755

In short: A security fix: templ v0.3.1100, which needs Go 1.26.

Fixed

  • templ v0.3.1100: code generated by earlier versions does not sanitize spread attributes such as { attrs... }, or URLs in attributes such as <iframe src>. Every vendored component passes Attributes through a spread, so every project with an htmx or Datastar frontend was affected. Headless and SvelteKit projects have no templ code.
  • goldmark v1.8.6 for docs and blog content (CVE-2026-5160).
  • Docker images on alpine:3.24 instead of alpine:3.20.2, which no longer gets security updates.
  • golang.org/x/crypto v0.57.0, golang.org/x/net v0.59.0 and the other golang.org/x modules templ pulls in.

Changed

  • Go 1.26: generated projects say go 1.26.0 and build on golang:1.26. goilerplate doctor reads the version from your go.mod and asks for Go 1.26.
  • shadcn-templ v2.0.0-beta.16 in AGENTS.md. The vendored components are unchanged.

Upgrade

  1. Install Go 1.26 or newer.
  2. Commit your work, run goilerplate update, then switch to the goilerplate-update-v3.1.1 branch. By hand instead: go get github.com/a-h/templ@v0.3.1100 github.com/yuin/goldmark@v1.8.6, go mod edit -go=1.26.0, and golang:1.26 and alpine:3.24 in your Dockerfile.
  3. Run go tool templ generate and go mod tidy, then build and test. Code generated by an older templ no longer compiles against v0.3.1100, so regenerating is required.