Skip to content

Commit

Permalink
add more bad templates
Browse files Browse the repository at this point in the history
  • Loading branch information
mshivashankar committed Feb 7, 2024
1 parent 8dac171 commit 0b76a87
Show file tree
Hide file tree
Showing 4 changed files with 36 additions and 0 deletions.
4 changes: 4 additions & 0 deletions library/Templates/Attachment/syntax_error_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{# Incorrect Jinja2 syntax (missing endfor) which will raise a TemplateSyntaxError #}
{% for item in some_list %}
{{ item }}
{# Missing {% endfor %} here #}
14 changes: 14 additions & 0 deletions library/Templates/Attachment/undefined_variable_error.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Undefined Error Example</title>
</head>
<body>
<h1>Attempting to Access an Undefined Variable</h1>
<p>
{# Accessing an undefined variable here #}
{{ non_existent_variable + non_existent_variable }}
</p>
</body>
</html>
4 changes: 4 additions & 0 deletions library/Templates/General/syntax_error_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{# Incorrect Jinja2 syntax (missing endfor) which will raise a TemplateSyntaxError #}
{% for item in some_list %}
{{ item }}
{# Missing {% endfor %} here #}
14 changes: 14 additions & 0 deletions library/Templates/General/undefined_variable_error.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Undefined Error Example</title>
</head>
<body>
<h1>Attempting to Access an Undefined Variable</h1>
<p>
{# Accessing an undefined variable here #}
{{ non_existent_variable + non_existent_variable }}
</p>
</body>
</html>

0 comments on commit 0b76a87

Please sign in to comment.