[FIX] test and fix escf: turns out it never worked

bzr revid: xmo@openerp.com-20110310085138-o1fpyef7eq7byza5
This commit is contained in:
Xavier Morel
2011-03-10 09:51:38 +01:00
parent e312689221
commit 952d6395ae
3 changed files with 9 additions and 1 deletions
@@ -31,6 +31,9 @@
equals("ok", render('esc-variable', {ok: 'ok'}), "Render a string variable");
equals("&lt;ok&gt;", render('esc-toescape', {ok: '<ok>'}), "Render a string with data to escape");
});
test("Formatted escaped data output", function () {
equals("ok", render('escf-noformat-literal', {}), "Render a literal string");
});
});
</script>
+5
View File
@@ -8,4 +8,9 @@
<t t-name="esc-toescape">
<t t-esc="ok"/>
</t>
<t t-name="escf-noformat-literal">
<t t-escf="ok"/>
</t>
</templates>
+1 -1
View File
@@ -180,7 +180,7 @@ var QWeb = {
return this.escape_text(this.eval_str(t_att["esc"], v));
},
render_tag_escf:function(e, t_att, g_att, v) {
return this.escape_text(this.eval_format(t_att["esc"], v));
return this.escape_text(this.eval_format(t_att["escf"], v));
},
render_tag_if:function(e, t_att, g_att, v) {
return this.eval_bool(t_att["if"], v) ? this.render_element(e, t_att, g_att, v) : "";