diff --git a/modules/web/html/html_template.cpp b/modules/web/html/html_template.cpp index f36159b3d..cb99a5b2e 100644 --- a/modules/web/html/html_template.cpp +++ b/modules/web/html/html_template.cpp @@ -463,11 +463,11 @@ String HTMLTemplate::render_template(const String &p_text, const Dictionary &p_d if (last_section_start <= text_length - 1) { result += p_text.substr_index(last_section_start, text_length); } - + return result; } -String HTMLTemplate::get_and_render_template(const StringName &p_name, const Ref &p_request, const Dictionary &p_data) { +String HTMLTemplate::get_and_render_template(const StringName &p_name, const Dictionary &p_data) { String text = get_template_text(p_name); return render_template(text, p_data); @@ -729,7 +729,7 @@ void HTMLTemplate::_bind_methods() { ClassDB::bind_method(D_METHOD("process_template_expression", "expression", "data"), &HTMLTemplate::process_template_expression); ClassDB::bind_method(D_METHOD("render_template", "text", "data"), &HTMLTemplate::render_template); - ClassDB::bind_method(D_METHOD("get_and_render_template", "name", "request", "data"), &HTMLTemplate::get_and_render_template); + ClassDB::bind_method(D_METHOD("get_and_render_template", "name", "data"), &HTMLTemplate::get_and_render_template); BIND_VMETHOD(MethodInfo(Variant::STRING, "_render", PropertyInfo(Variant::OBJECT, "request", PROPERTY_HINT_RESOURCE_TYPE, "WebServerRequest"), diff --git a/modules/web/html/html_template.h b/modules/web/html/html_template.h index b36be5fd5..54b02348b 100644 --- a/modules/web/html/html_template.h +++ b/modules/web/html/html_template.h @@ -92,7 +92,7 @@ public: String process_template_expression(const String &p_expression, const Dictionary &p_data); String render_template(const String &p_text, const Dictionary &p_data); - String get_and_render_template(const StringName &p_name, const Ref &p_request, const Dictionary &p_data); + String get_and_render_template(const StringName &p_name, const Dictionary &p_data); String render(const Ref &p_request, const Dictionary &p_data); virtual String _render(const Ref &p_request, const Dictionary &p_data);