Write a Python CLI tool render-template that reads two inputs and writes the result to stdout:
Write a Python CLI tool render-template that reads two inputs and writes the result to stdout:: a task in TermGrade Environments: 1,004 executable Linux tasks (Harbor dataset). Escaping rules (MUST be applied, in this order, to EVERY variable substitution {{ var }} ): 1. Backslash-escape: \ → \\…
The task
**Escaping rules** (MUST be applied, in this order, to EVERY variable substitution `{{ var }}`): 1. Backslash-escape: `\` → `\\` 2. Backslash-escape: `"` → `\"` 3. If the original raw value contains any of the characters in the set `{<, >, &, ", \}` (tested BEFORE step 1 escaping), wrap the whole escaped value in…
Part of ai-and/termgrade-environments.