test: D1-5 enforce LiquidTagSubset via restricted parser, reject unsupported tags

This commit is contained in:
2026-05-29 22:13:01 +02:00
parent 0ce90e96e5
commit 535ab81082
7 changed files with 96 additions and 5 deletions

View File

@@ -132,7 +132,7 @@ defmodule BDS.Rendering.TemplateSelection do
@spec render_template(String.t(), String.t(), map()) ::
{:ok, String.t()} | {:error, String.t()}
def render_template(project_id, source, assigns) do
with {:ok, template_ast} <- Liquex.parse(source),
with {:ok, template_ast} <- Liquex.parse(source, BDS.Rendering.LiquidParser),
{:ok, _rendered} = ok <- safe_liquex_render(template_ast, project_id, assigns) do
ok
else