node.js render method

My question is very simple. I am using the node.js with express and jade view engine. When I render some file and send in field of object HTML tags, in the file I get a funny laughableness. For example: app.js

res.render('not_found', { 
 field: "<a href='/'>main page</a>"
});

in file not_found.jade

&lt;a href='/'&gt;main page&lt;/a&gt;

And my question: how can I send a html code in in the value of an object field?

Sorry for my English :)

The short answer is that you need to use the proper code in your template so that it isn't escaped, as the jade documentation explains in the Tag Text section.

Interpolation with #{} will be escaped, as you saw. If you need unescaped interpolation, you need to use !{} to tell jade not to mangle up your data.

If you haven't seen Jade Syntax Documentation by Example - escaping, it gives a few examples of this. The rest of the page is very useful as you can edit/test your ideas.

And to answer your question, you'd need to change your jade template from #{field} to !{field}.