Unbuffered code starts with
- does not add any output directly, e.g.
- for (var x = 0; x < 3; x++) li item
<li>item</li> <li>item</li> <li>item</li>
Jade also supports block unbuffered code:
- list = ["Uno", "Dos", "Tres", "Cuatro", "Cinco", "Seis"] each item in list li = item
<li>Uno</li> <li>Dos</li> <li>Tres</li> <li>Cuatro</li> <li>Cinco</li> <li>Seis</li>
Buffered code starts with
p = 'This code is <escaped>!'
<p>This code is <escaped>!</p>
p!= 'This code is' + ' <strong>not</strong> escaped!'
<p>This code is <strong>not</strong> escaped!</p>
Unescaped buffered code can be dangerous. You must be sure to sanitize any user inputs to avoid cross-site scripting.