using three curly braces instead of two for right escaping #7
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 to5 > 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!