If I try to make a table for an email and use a loop in it:
<table>
<tr>
<th>Column1</th>
<th>Column1</th>
</tr>
% for comp in object.component_ids:
<tr>
<td>${data1}</td>
<td>${data2}</td>
</tr>
% endfor
</table>
And as soon as I save it, Odoo takes the % for and % endfor out of my table and puts them front of the <table>. Any idea why?