Class to handle compiling template function calls for "jsescape".

This function escapes the first argument for JavaScript. Note that the first argument is a value, not a variable reference. Variables used within will be HTML escaped first, unless you use raw.

The second argument controls the context for escaping (single, double).

package XenForo_Template

 Methods

Compile the content in the first argument and escape it for JS based on the second.

compile(\XenForo_Template_Compiler $compiler, string $function, array $arguments, array $options) : string

Parameters

$compiler

\XenForo_Template_Compiler

The invoking compiler

$function

string

Name of the function called

$arguments

array

Arguments to the function (should have at least 1)

$options

array

Compilation options

Returns

string