Test that Liquid expressions are not deeply evaled (#8292)

Merge pull request 8292
This commit is contained in:
Ashwin Maroli 2020-11-11 18:09:40 +05:30 committed by GitHub
parent 83a2b30b76
commit fadbe9eba4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 23 additions and 0 deletions

View File

@ -170,3 +170,26 @@ Feature: Rendering
Then I should get a zero exit status
And the _site directory should exist
And I should see "hey = 'for cicada';" in "_site/index.js"
Scenario: Rendering Liquid expressions that return strings containg Liquid expressions
Given I have an "index.md" file with content:
"""
---
prequel: "{% link series/first-part.md %}"
sequel: "{% link series/last-part.md %}"
---
This is the second-part of the series named {{ site.novel }}.
The first part is at {{ page.prequel }}.
Lorem ipsum
{% capture sequel_link %}{{ page.sequel }}{% endcapture %}
The last part of the series can be read at {{ sequel_link }}
"""
And I have a configuration file with "novel" set to "'{{ site.title }}'"
When I run jekyll build
Then I should get a zero exit status
And I should see "series named {{ site.title }}" in "_site/index.html"
And I should see "{% link series/first-part.md %}" in "_site/index.html"
And I should see "{% link series/last-part.md %}" in "_site/index.html"