diff options
| author | Yuriy Andamasov <yuriy@vyos.io> | 2026-05-07 09:25:58 +0300 |
|---|---|---|
| committer | Yuriy Andamasov <yuriy@vyos.io> | 2026-05-07 09:25:58 +0300 |
| commit | a5b8e6fa6b6078e77bff329cac751c0b873f5f4b (patch) | |
| tree | bc976200b04001727b9ee7f2fa478317704450cb /docs | |
| parent | 1ce4a62f07759fc4bedd127236ef64110a1e8f89 (diff) | |
| download | vyos-documentation-a5b8e6fa6b6078e77bff329cac751c0b873f5f4b.tar.gz vyos-documentation-a5b8e6fa6b6078e77bff329cac751c0b873f5f4b.zip | |
docs(conf.py): set Jinja autoescape=False explicitly for llms.txt template
The llms.txt template renders plain text (markdown), not HTML, so the
HTML autoescape rules that bandit/ruff S701 flags don't apply.
Explicit `autoescape=False` silences the lint while documenting the
intent — there's no HTML context to escape into here.
Behavior unchanged (Jinja's default `autoescape=False` was already in
effect); this just makes it visible.
Same change applied symmetrically across [#1874](https://github.com/vyos/vyos-documentation/pull/1874) (current),
[#1876](https://github.com/vyos/vyos-documentation/pull/1876) (sagitta), and [#1903](https://github.com/vyos/vyos-documentation/pull/1903) (circinus).
Addresses CodeRabbit review feedback (S701) on PR #1876.
\xf0\x9f\xa4\x96 Generated by [robots](https://vyos.io)
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/conf.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/docs/conf.py b/docs/conf.py index cbe5fb67..26ce346c 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -296,6 +296,10 @@ def _write_llms_txt(app, exception): loader=FileSystemLoader(str(tpl_dir)), undefined=StrictUndefined, keep_trailing_newline=True, + # Plain-text template (not HTML), so HTML autoescape is not + # appropriate. Setting autoescape=False explicitly to silence + # bandit/ruff S701 and document the intent. + autoescape=False, ) template = env.get_template('llms.txt.j2') rendered = template.render( |
