## Lesson — Separate utilities for trusted and untrusted content allow

**Tags:** security, xml, architecture

Separate utilities for trusted and untrusted content allow for performance optimizations on local data while enforcing strict entity escaping on hostile network fetches. This prevents prompt injection and XML breakout while maintaining readability for internal diffs.
