Javascript Template Output Encodings

1 view
Skip to first unread message

Ben Ilegbodu

unread,
Dec 24, 2009, 1:09:59 PM12/24/09
to uize
In the Javascript Template explainer, there's a section on encoding output of parameters to the JST.  The Uize.Template documentation, lists the various predefined encodings (json, urlParams, etc.).  I need an encoding for HTML attributes.  I have a JST to in which one of the parameters goes into the attribute of an HTML node, and I want to ensure that it won't break the parsing of the page.

I imagine that all that really needs to be done is encoding " into an HTML entity, but it seems that the proper way would be to encode all HTML.  Do you know how I would go about doing that and adding it to the Uize.Template encoders?  Is it something that should be added to it by default?

Reply all
Reply to author
Forward
0 new messages