{
  "id": "python/flask-jinja-autoescape-off",
  "signature": "jinja2.exceptions.SecurityError: autoescape is disabled, but Markup is used",
  "signature_zh": "jinja2.exceptions.SecurityError: 自动转义已禁用，但使用了 Markup",
  "regex": "jinja2\\.exceptions\\.SecurityError:\\ autoescape\\ is\\ disabled,\\ but\\ Markup\\ is\\ used",
  "domain": "python",
  "category": "config_error",
  "subcategory": null,
  "root_cause": "Using Markup or |safe on untrusted data with autoescape disabled, Jinja raises a security error in strict mode.",
  "root_cause_type": "generic",
  "root_cause_zh": "在自动转义禁用的情况下对不可信数据使用 Markup 或 |safe，Jinja 在严格模式下抛出安全错误。",
  "versions": [
    {
      "version": "3.x",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    }
  ],
  "os_specific": {},
  "dead_ends": [
    {
      "action": "",
      "why_fails": "Breaks legitimate HTML rendering; templates show escaped tags.",
      "fail_rate": 0.5,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "Unrelated setting; error persists.",
      "fail_rate": 0.8,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "",
      "success_rate": 0.93,
      "how": "app.jinja_env.autoescape = select_autoescape(['html', 'xml'])",
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "success_rate": 0.9,
      "how": "Sanitize with bleach.clean(html, tags=[...]) before marking safe",
      "condition": "",
      "sources": []
    }
  ],
  "workarounds_zh": [],
  "transition_graph": {
    "leads_to": [],
    "preceded_by": [],
    "frequently_confused_with": []
  },
  "official_doc_url": null,
  "official_doc_section": null,
  "error_code": null,
  "verification_tier": "ai_generated",
  "confidence": 0.82,
  "fix_success_rate": 0.8,
  "resolvable": "true",
  "first_seen": "2024-07-07",
  "last_confirmed": "2025-01-01",
  "last_updated": "2025-01-01",
  "evidence_count": 0,
  "tags": [],
  "locale": "en",
  "aliases": []
}