doc to prefer literal html injection
This commit is contained in:
parent
465cc74796
commit
684a89460f
2 changed files with 30 additions and 1 deletions
|
|
@ -41,6 +41,13 @@ own SQLite file). Ids are integers. Build a structure by: create it → add a db
|
|||
write its library → add routes whose handlers call the library → add templates
|
||||
the handlers render.
|
||||
|
||||
**Templates are hypermedia, not escaped-string templates.** Default to `<%~ %>`
|
||||
(raw) over `<%= %>` (escaped) in Eta content — only use `<%= %>` inside an HTML
|
||||
attribute value, where an unescaped `"` would break the tag. Reach for htmx
|
||||
attributes (`hx-trigger="every 10s"`, `hx-swap-oob`, etc.) instead of JS
|
||||
`setTimeout`/`fetch` polling loops. See CLAUDE.md's "hypermedia homestead"
|
||||
section for the full rationale.
|
||||
|
||||
## Reads (JSON)
|
||||
|
||||
```bash
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue