Search code examples
javascriptbugzillatemplate-toolkit

Unexpected token ILLEGAL from template toolkit with Javascript,


var x = document.getElementById('comments');
x.innerHTML=  '[% PROCESS bug/comments.html.tmpl'+
            ' comments = bug.comments,'+
            ' mode = "edit" %] ';

I don't see any type of invalid characters, I have also tried to put double slash (//). what I am missing?


Solution

  • I think your code have to be something like this

    var x = document.getElementById('comments');
    x.innerHTML=  '[%~ PROCESS bug/comments.html.tmpl comments = bug.comments, mode = "edit" ~%]';