rife.render.EncodeUnicode - rife2/rife2-template-renderers GitHub Wiki
Encodes a template value to Unicode escape codes.
Usage
<!--v render:rife.render.EncodeUnicode:valueId/-->
{{v render:rife.render.EncodeUnicode:valueId/}}
Syntax
Template
{{v render:rife.render.EncodeUnicode:sample/}}
Code
template.setAttribute("sample", "This is a test.")
Output
\u0054\u0068\u0069\u0073\u0020\u0069\u0073\u0020\u0061\u0020\u0074\u0065\u0073\u0074\u002E
Properties
By default, the rendered data is raw, not template encoded. If you need additional encoding, use the encoding
property.
For example, to encode the rendered data to HTML:
{{v render:rife.render.EncodeUnicode:valueId}}
encoding=html
{{/v}}
The supported additional encoding types are:
html
js
json
unicode
url
xml