You are not logged in.
Pages: 1
Hi
I'm trying to add a Mustache Helper that inserts some JavaScript into my HTML page
The JS content contains some double-quotes but the resulting output has these escaped - I want it to just be the straight copy of what I'm sending...
Simple example....
if my HTML Template contains...
{{JSContent "anytext"}}
and my helper is like this...
procedure TMyMVCApplication.JSContent(const Value: variant; out result: variant);
begin
result:= 'this.getText = function(MyAction) {return "Redo";};';
end;
the resulting HTML after the Mustache rendering is...
this.getText = function(MyAction) {return "Redo";};
Is there any way I can stop the helper (or is it the renderer?) ESCaping the quotes?
Offline
Ahh worked it out...
{{{ or {{& can be used to unescape the output
{{& JSContent "anytext"}}
Offline
Pages: 1