--TEST-- "json_encode" filter --TEMPLATE-- {{ "foo"|json_encode|raw }} {{ foo|json_encode|raw }} {{ [foo, "foo"]|json_encode|raw }} --DATA-- return array('foo' => new Twig_Markup('foo', 'UTF-8')) --EXPECT-- "foo" "foo" ["foo","foo"]
info at phpclasses dot org