olado/doT — Issue #20: &lt;div&gt;undefined&lt;/div&gt;
Author: violinchris
Created: 2012-01-27 16:26:50+00:00
State: open

Apologies if this is something I should have been able to find by searching the issues. I did triy and did not find an answer to my question. Can I not use the word "undefined" in a div, span, p, etc? For example, why can't I do this in an expressjs app.

var tempFn = doT.template(<div>undefined</div>);
var html = tempFn({});
res.send(html);

I get the following error.

Express
500 SyntaxError: Unexpected identifier
at Object.Function (unknown source)
at Object.template (/usr/local/lib/node/.npm/dot/0.1.7/package/doT.js:91:11)
...

There might be a legitimate use for the word "undefined." Thanks.

Chris