-
Notifications
You must be signed in to change notification settings - Fork 76
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
Lack of Handlebars.SafeString Support #25
Labels
Comments
ebernhardson
added a commit
to ebernhardson/lightncandy
that referenced
this issue
Apr 11, 2014
Handlebars.js and other templating engines offer a way to return a value from a helper and not have it escaped based on the helpers choice, rather than the templates. This adds a new feature flag and associated code to create a new LCSafeString class. When returned from a helper the contents of the LCSafeString are output as-is. There may be some interactions with LCRun2::raw that i don't understand yet. Addresses zordius#25
ebernhardson
added a commit
to ebernhardson/lightncandy
that referenced
this issue
Apr 11, 2014
Handlebars.js and other templating engines offer a way to return a value from a helper and not have it escaped based on the helpers choice, rather than the templates. This adds a new feature flag and associated code to create a new LCSafeString class. When returned from a helper the contents of the LCSafeString are output as-is. There may be some interactions with LCRun2::raw that i don't understand yet. Addresses zordius#25
I have some idea in #28 , please comments for your requirement and verify my design, thanks. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
In Handlebars.js, you can bypass the string escaping when using a Helper function by wrapping your return string with
Handlebars.SafeString(String)
. However, such a thing doesn't appear to exist in lightncandy. It also providesHandlebars.Utils.escapeExpression(String)
for manual escaping in such a scenario.The text was updated successfully, but these errors were encountered: