You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The new JavaScript renderer also has it’s own implementation of the partial function. This new implementation behaves almost the same as the original implementation, but is smart enough to know that if you are rendering an *.html file inside of a *.js file that it will need to be escaped properly, and so it does it for you.
But not much as described! Yes we are in a JS template, and partial calls here must be escaped, But another partial in HTML partials must be render with HTML ones not JavaScript...
I am not 100% sure but the behavior described in the document was changed at v0.13.3 by gobuffalo/buffalo#1433. There is not much description on the PR, but the PR removed the buffalo-specific helper function (link [1])
Basically, the policy on Javascript and/or HTML escaping is somewhat tricky since there is a trade-off between convenience and security concerns (such as script injection) even though the partial function is basically not for end-user content but for developers, so there are completely different opinions on the way to handle them.
You can also find related discussions or requests on the following issues or PRs:
As what described here Naming partial example, We able to use partial as below(One leve partial call):
t1.html that use partial _t1.html:
_t1.html:
That will get us:
That's good, but what I`m try to do:
t1.js
_t1.html:
_t1.form.html
And in action (GO)(templateing and rendering with plush)
get me somthing like this:
AND what expected:
Did I missed something, or can be it done?
The text was updated successfully, but these errors were encountered: