From 684a89460f170723ef3a014fa01584197b2c8f1f Mon Sep 17 00:00:00 2001 From: Your Name Date: Sat, 8 Aug 2026 17:57:14 -0400 Subject: [PATCH] doc to prefer literal html injection --- CLAUDE.md | 24 +++++++++++++++++++++++- bliss-cli/SKILL.md | 7 +++++++ 2 files changed, 30 insertions(+), 1 deletion(-) diff --git a/CLAUDE.md b/CLAUDE.md index 682e5fc..e01c6f8 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -17,7 +17,29 @@ Requires a `.env` file with `VAPID_PUBLIC_KEY` and `VAPID_PRIVATE_KEY` for web p Bliss is a browser-based low-code platform where users build mini web apps ("Structures") entirely through a `/workshop` UI. Each Structure has routes, templates, and SQLite databases — all stored in the main app database and executed at runtime via Node's `vm` module. -## Architecture +## Design philosophy: this is a hypermedia homestead + +Bliss templates are not a web-app-with-an-API. There is no client-side framework, +no JSON contract, no build step — the HTML *is* the application, and it composes +by embedding more HTML (see "page-nesting primitive" below). Every template you +write or edit should lean into that instead of fighting it: + +- **Prefer `<%~ %>` (raw) over `<%= %>` (HTML-escaped) in Eta templates, always, + unless you are interpolating into an HTML attribute value.** Attribute values + (`id="..."`, `data-*="..."`, `href="..."`, `style="..."`, `value="..."`) are + the one place escaping is not optional — an unescaped `"` there breaks the tag + itself, not just a security nicety. Everywhere else (text content, `