Skip to content

Commit

Permalink
Merge pull request #99 from Ryman/unescaped_implicit_iteration
Browse files Browse the repository at this point in the history
Test for unescaped implicit iteration
  • Loading branch information
jgonggrijp authored Oct 26, 2023
2 parents 5d3b58e + f8e3aba commit 87996a1
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions specs/sections.yml
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,27 @@ tests:
template: '"{{#list}}({{#.}}{{.}}{{/.}}){{/list}}"'
expected: '"(123)(abc)"'

- name: Implicit Iterator - HTML Escaping
desc: Implicit iterators with basic interpolation should be HTML escaped.
data:
list: [ '&', '"', '<', '>' ]
template: '"{{#list}}({{.}}){{/list}}"'
expected: '"(&amp;)(&quot;)(&lt;)(&gt;)"'

- name: Implicit Iterator - Triple mustache
desc: Implicit iterators in triple mustache should interpolate without HTML escaping.
data:
list: [ '&', '"', '<', '>' ]
template: '"{{#list}}({{{.}}}){{/list}}"'
expected: '"(&)(")(<)(>)"'

- name: Implicit Iterator - Ampersand
desc: Implicit iterators in an Ampersand tag should interpolate without HTML escaping.
data:
list: [ '&', '"', '<', '>' ]
template: '"{{#list}}({{&.}}){{/list}}"'
expected: '"(&)(")(<)(>)"'

# Dotted Names

- name: Dotted Names - Truthy
Expand Down

0 comments on commit 87996a1

Please sign in to comment.