' create error #2

akidee opened this Issue Jun 6, 2010 · 1 comment


None yet
2 participants

akidee commented Jun 6, 2010

single quotes create errors:

node microtemplates.js 
y(p,arguments);};with(obj){p.push('', message.escapeXml() ,''\'');}retu
SyntaxError: Unexpected token ILLEGAL
    at Object.Function (unknown source)
    at tmpl (/home/andi/.node_libraries/_m.js:8:12)
    at Object. (/home/andi/node_playing/microtemplates.js:14:9)
    at Module._compile (module:384:23)
    at Module._loadScriptSync (module:393:16)
    at Module.loadSync (module:296:10)
    at Object.runMain (module:459:22)
    at node.js:196:8

Original template:

<%= message.escapeXml() %>''

Yeah, one should be able to include single quotes in a template, especially for embedded JavaScript.


creationix commented Jun 7, 2010

Yikes, any clue on how to solve this one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment