--- id: LANG-7 family: GR-LANG level: core profiles: [runtime] posture: normative-target added: "1.0" changed: "1.0" source: https://flowdrop.io/spec/rules/gr-lang/lang-7 specification: FlowDrop Workflow Specification 1.0 licence: CC BY 4.0 --- # LANG-7 — Twig yields an escaped string and treats a missing variable as empty *GR-LANG (Part I) · level: core · profiles: runtime · added in 1.0* ## The rule > **Normative.** This is the rule. > > 1. A Twig template MUST produce a string. > > 2. The string MUST be HTML-escaped unless the value is piped through `raw`. > > 3. A variable absent from the context MUST render as the empty string rather than failing. > > 4. A template that cannot be compiled, and a template that fails while rendering, MUST both fail with an error saying which of the two occurred. ## Why Recorded under [OPEN-25](https://flowdrop.io/spec/rulings/open-25). ## Related rules - Referenced by: LANG-6, LANG-13, LANG-26 --- Rule identifiers are permanent and are never renumbered. This specification carries no implementation status: each implementation publishes its own standing against these rules. Licensed CC BY 4.0.