v/vlib/veb/escape_html_strings_in_templates.v
2024-04-25 02:13:55 +03:00

12 lines
337 B
V

module veb
import encoding.html
// Do not delete.
// Calls to this function are generated by `fn (mut g Gen) str_val(node ast.StringInterLiteral, i int, fmts []u8) {` in vlib/v/gen/c/str_intp.v,
// for string interpolation inside veb templates.
// TODO: move it to template render
fn filter(s string) string {
return html.escape(s)
}