diff --git a/.ruff.toml b/.ruff.toml index ba4201151..a84b37128 100644 --- a/.ruff.toml +++ b/.ruff.toml @@ -69,7 +69,6 @@ ignore = [ "S404", # `subprocess` module is possibly insecure "S405", # `xml.etree` methods are vulnerable to XML attacks "S603", # `subprocess` call: check for execution of untrusted input - "S701", # Using jinja2 templates with `autoescape=False` is dangerous and can lead to XSS. Ensure `autoescape=True` or use the `select_autoescape` function. "S702", # Mako templates allow HTML and JavaScript rendering by default and are inherently open to XSS attacks # flake8-simplify "SIM102", # Use a single `if` statement instead of nested `if` statements diff --git a/tests/test_util/test_util_rst.py b/tests/test_util/test_util_rst.py index bbe34f54b..d6e83433a 100644 --- a/tests/test_util/test_util_rst.py +++ b/tests/test_util/test_util_rst.py @@ -165,7 +165,7 @@ def test_textwidth(): def test_heading(): - env = Environment() + env = Environment(autoescape=True) env.extend(language=None) assert heading(env, 'Hello') == 'Hello\n====='