User Tools

Site Tools


en:public:developer:template_system:tags:parameters:jsencode

Table of Contents

JsEncode

Parameter “JsEncode” defines that the value of corresponding variable or result of function will be converted to the format accessible for Javascript-output. Managing characters for Javascript (like quotes, equal signs etc) will be escaped.

NOTE: By default the resulting content will be parsed (all <#..> tags will be evaluated) before to apply this filter. You can control this behavior throught the parameter AnalyzeTagParams

Values

Value Description
1 Means that value must be javascript-encoded.
0 Means that value must be javascript-decoded.

Example

<#JavascriptVar setValue="var test = '1';">
<#JavascriptVar JsEncode="1">

Output:

var test = \u00271\u0027;
en/public/developer/template_system/tags/parameters/jsencode.txt · Last modified: 2013/01/28 17:42 by admin