User Tools

Site Tools


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

This is an old revision of the document!


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 \u003D 1\u003B
en/public/developer/template_system/tags/parameters/jsencode.1359378015.txt.gz · Last modified: 2013/01/28 17:00 by admin