Templates offer way of creating html chunks. Options such as html encoding and compilation for optimal performance are available.
Basic template
var inlineTemplate = kendo.template("Hello, #= firstName # #= lastName #");
var inlineData = { firstName: "John", lastName: "Doe" };
$("#inline").html(inlineTemplate(inlineData));
Output:
Hello, John Doe!Encoding HTML
var encodingTemplate = kendo.template("HTML tags are encoded like this - ${ html }");
var encodingData = { html: "<strong>lorem ipsum</strong>" };
$("#encoding").html(encodingTemplate(encodingData));
Output:
HTML tags are encoded like this - <strong>lorem ipsum</strong>No code