Strip the expression string before passing it to process_template_expression().

This commit is contained in:
Relintai 2024-02-26 11:56:30 +01:00
parent 81c8e4aa75
commit d3535ef0ca

View File

@ -422,7 +422,7 @@ String HTMLTemplate::render_template(const String &p_text, const Dictionary &p_d
String expression = p_text.substr_index(last_section_start, i - 2); String expression = p_text.substr_index(last_section_start, i - 2);
result += process_template_expression(expression, p_data); result += process_template_expression(expression.strip_edges(), p_data);
// i points to: v // i points to: v
// ... {{ // ... {{