Skip to content
New issue

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

Miss render on & char (golang) #21

Closed
ridhoperdana opened this issue Feb 2, 2018 · 1 comment
Closed

Miss render on & char (golang) #21

ridhoperdana opened this issue Feb 2, 2018 · 1 comment

Comments

@ridhoperdana
Copy link

I am trying to render an URL using Render function on mustache (golang). When I try to render this http://example.com?param1=1&param2=2 the result is http://example.com?param1=1&param2=2

The template I use is like this:

map[string]string{
   "URL":"http://example.com?param1=1&param2=2",
}

The text I want to render is like this:
I want to access this url={{URL}}

Am I not using the function correctly? Thanks inadvance

@cbroglie
Copy link
Owner

cbroglie commented Feb 2, 2018

By default, mustache will escape characters inside of {{ }} blocks. You can disable the escaping by using triple brackets:

I want to access this url={{{URL}}}

@cbroglie cbroglie closed this as completed Feb 2, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants