--- 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-draft 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 always produces a string, HTML-escaped unless the value is piped through `raw`. > > 2. A variable absent from the context renders as the empty string rather than failing. > > 3. A template that cannot be compiled, and a template that fails while rendering, both fail with an error saying which of the two occurred. ## 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.