diff --git a/CLAUDE.md b/CLAUDE.md index 03e51eb..4fbfb74 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -126,6 +126,13 @@ assembles all crates. `crates/myapps-core/src/i18n/`. App-specific translations live in each app crate's `i18n.rs` module. Both use compile-time struct-based translations; adding a field forces both EN and ES to be updated. +- **Escape user-controlled strings before interpolating them into HTML.** Handlers + build markup with `format!`, which does no escaping, so any user- or + provider-supplied value (account names, label names, transaction descriptions + and counterparties) must go through `myapps_core::components::html_escape` + first. It escapes both quote characters, so it is safe in element bodies and + in quoted attribute values. Note that `