We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
@variable will automatically escape the variable, but I found that the escaping doesn't work in layout.
@variable
The text was updated successfully, but these errors were encountered:
The template file, it depends on the layout.
@{ import { "tpl/user/layout/base" } <div> @user.Name </div> }
The layout file, base.gohtml
base.gohtml
@{ var body string } <!DOCTYPE html> <html lang="en"> <head></head> <body> @body <div>@user.Name</div> </body> </html>
If user.Name is Leo<div> , in the layout file, the @body is Leo<div>, but the @user.Name is Leo<div>.
user.Name
Leo<div>
@body
Leo<div>
@user.Name
Sorry, something went wrong.
fixed in 832cad0
No branches or pull requests
@variable
will automatically escape the variable, but I found that the escaping doesn't work in layout.The text was updated successfully, but these errors were encountered: