According to the Jinja2 docs Link, it provides:
powerful automatic HTML escaping system for XSS prevention
According to the Flask docs, it prevents XSS attacks by configuring Jinja2 to automatically escape all values unless explicitly told otherwise. So does Jinja2 do anything on its own to prevent XSS attacks?