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

using three curly braces instead of two for right escaping #7

Open
wants to merge 7 commits into
base: master
Choose a base branch
from

Conversation

qux42
Copy link

@qux42 qux42 commented Jan 2, 2021

Hello @nalipaz,
the escaping in the template file is wrong. Especially this the checkip_command this is quite critical, because there are often quotes or other characters used, that need right escaping.

From the doc of mustache:
mustache.go follows the official mustache HTML escaping rules. That is, if you enclose a variable with two curly brackets, {{var}}, the contents are HTML-escaped. For instance, strings like 5 > 2 are converted to 5 > 2. To use raw characters, use three curly brackets {{{var}}}.

In order to fix the problem, I changed the escaping from HTML to raw.

Update:
I'm slowly changing to an complete fork, because this seems not maintained anymore. Sadly I commited everything on the same branch, so the pull-request contains more than it should.

If you are still planing to accept mergerequests, let me know, then I clear this one up again!

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

Successfully merging this pull request may close these issues.

1 participant