{"version":"2.1.311","anchor":"closing-tag-escaping-in-a-wrapper","canonical_anchor":"closing-tag-escaping-in-a-wrapper","heading":"Text that tries to close a wrapper tag early is now escaped","tier":"internal","area":"Agents","scope":"individual","heads_up":false,"url":"https:\/\/changelogs.core-directive.com\/v\/2.1.311\/e\/closing-tag-escaping-in-a-wrapper","release_url":"https:\/\/changelogs.core-directive.com\/v\/2.1.311","markdown":"### Text that tries to close a wrapper tag early is now escaped\n\nWhen Claude Code wraps text in a tag, it now escapes any closing tag for that wrapper in the text so the wrapper cannot be ended early\n\n**What**\n\nClaude Code sometimes wraps a piece of text in a labelled tag before passing it on, so it is clear where the text starts and ends. In one such wrapper, any `<` that would begin a closing tag for that wrapper is now escaped, meaning it is turned into harmless text. Before, the text that followed was added without this.\n\n**Why**\n\nThis guards against prompt injection, where text tries to trick the model into treating it as instructions. Injected text can no longer end the wrapper early and pretend to be outside it.\n\n- Area: Agents\n- Tier: Under the hood\n- Useful: 1\/5\n- Signal: 1\/5\n- Scope: individual\n- Heads-up: no"}