Complete the code to safely display a user input variable in a Flask template.
{{ [1] }}In Flask templates, using {{ user_input }} automatically escapes the content to prevent XSS.
Complete the code to mark a string as safe and prevent escaping in a Flask template.
{{ user_input | [1] }}Using | safe tells Flask not to escape the string, so it renders as raw HTML.
Fix the error in the template code to properly escape user input.
{{ [1] }}Using just {{ user_input }} ensures Flask auto-escapes the content to prevent XSS.
Fill both blanks to create a dictionary comprehension that escapes user inputs in Flask.
{% set escaped = {key: value | [1] for key, value in user_data.items() if value [2] ''} %}Use | escape to escape values and != to filter out empty strings.
Fill all three blanks to safely render user input with a default fallback in Flask template.
{{ ([1] or [2]) | [3] }}Use user_input or empty string '' and apply escape filter to prevent XSS.