Skip to content

Commit

Permalink
Create _tag_var.html.jinja
Browse files Browse the repository at this point in the history
  • Loading branch information
vanvianen committed Jul 14, 2024
1 parent f5481ac commit 5c0db31
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions src/jinja/tags/_tag_var.html.jinja
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
{#
Copyright 2024 Scape Agency BV
#}

{#
Variable (<var>)
===========================================================================
Defines a variable in a mathematical expression or programming context.
Variables:
- `var_text`: The text to be displayed as a variable. Defaults to
"variable".
Notes:
- The `| e` filter is used to escape any special characters in the
variables to prevent XSS attacks.
- The <var> element is typically used to format variables in mathematical
expressions or computer code.
Links:
- https://developer.mozilla.org/en-US/docs/Web/HTML/Element/var
- https://www.w3schools.com/tags/tag_var.asp
#}

<var>{{ var_text | default('variable') | e }}</var>

0 comments on commit 5c0db31

Please sign in to comment.