-
Notifications
You must be signed in to change notification settings - Fork 137
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
RenderTemplate using the text/template package, not the html one #416
RenderTemplate using the text/template package, not the html one #416
Conversation
Signed-off-by: Gianluca Arbezzano <[email protected]>
A template does not need to be rendered with HTML escape, or at least not at that layer. It was a mistake probably caused by a wrong goimport. Signed-off-by: Gianluca Arbezzano <[email protected]>
Codecov Report
@@ Coverage Diff @@
## master #416 +/- ##
==========================================
+ Coverage 33.04% 33.08% +0.04%
==========================================
Files 24 24
Lines 2170 2170
==========================================
+ Hits 717 718 +1
+ Misses 1377 1376 -1
Partials 76 76
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess it's sufficient to fix #415 👍
By default the html/template rendered an empty string when a variable is not passed to the template.Execution. The text/template has a different behavior. By default it prints `<no value>`. With this configuration now it errors and tells that a variable is missed Signed-off-by: Gianluca Arbezzano <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks.
Description
Apparently, we imported the wrong package, we need to use text no HTML rules.
Why is this needed
Wrong import, we do not need to escape following HTML rules.
Fixes: #415
How Has This Been Tested?
Unit test
Checklist:
I have: