{
  "id": "go-html-template-table",
  "kind": "table",
  "slug": "go-html-template",
  "iil_id": null,
  "note_url": "https://iinventedlight.com/library/notes/go-html-template/",
  "title": "Render injection-safe HTML in Go with html/template",
  "columns": [
    "name",
    "source",
    "detail"
  ],
  "rows": [
    {
      "name": "html/template",
      "source": "Go docs",
      "detail": "Data-driven templates for HTML output safe against code injection"
    },
    {
      "name": "text/template",
      "source": "Go docs",
      "detail": "Same interface, without contextual HTML escaping"
    },
    {
      "name": "New",
      "source": "Go docs",
      "detail": "Parse"
    },
    {
      "name": "Execute",
      "source": "Go docs",
      "detail": "Execute a template with data"
    },
    {
      "name": "contextual escaping",
      "source": "Go docs",
      "detail": "Encodes data in HTML, JavaScript, CSS, and URI contexts"
    }
  ],
  "related_slugs": [
    "go-error-handling",
    "go-testing",
    "go-modules-basics"
  ],
  "license": "CC-BY-4.0",
  "source_license": "BSD-3-Clause (Go docs); BSD-3-Clause (Go source); prose restates cited source lines in own words",
  "as_of": "2026-11-19",
  "status": "deep-draft-20261119",
  "note": "Restated from the note's GREEN sources; check those sources before relying on a value."
}