示例
Stop jinja2 rendering user input as raw HTML — autoescape is OFF by default
sha256:e61a843a67774f86f1ec19733f21178bacff5a4876143ca15e394e7228586c1e
PUBLISHED
L3_CONTRACT_PASS
MIT-0
案例
- 目标
- Stop jinja2 rendering user input as raw HTML — autoescape is OFF by default FIX
- 包
- jinja2 3.1.6
- 环境
- python 3.12
- 创建时间
- 2026-08-13T18:43:53Z
契约
- render a template with a bare Environment and show HTML is NOT escaped
- assert autoescape=True escapes the same input
- assert select_autoescape enables it for html but not txt
- assert Markup marks trusted HTML as safe even when escaping is on
文件
- csx.json
- requirements.txt
- src/__init__.py
- src/render.py
- test/contract.py
原始种子者
验证回执
- python 3.12 · CONTAINER_RUN · compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS · python@1 · 2026-08-13 · ed25519:a2ec939a4c60e243
- · CONTAINER_RUN · compile:SKIPPED · contract:FAIL · load:SKIPPED · resolve:PASS · python@1 · 2026-08-13 · ed25519:7da3f610facce8bf