fixed output of bag values

Call json_encode with flags: JSON_UNESCAPED_SLASHES and
JSON_UNESCAPED_UNICODE
This commit is contained in:
Pavel Volokitin 2013-04-12 18:08:01 +06:00 committed by Fabien Potencier
parent 3c44d487f2
commit f1632266e4
2 changed files with 7 additions and 5 deletions

View File

@ -7,10 +7,11 @@
</thead>
<tbody>
{% for key in bag.keys|sort %}
<tr>
<th>{{ key }}</th>
<td>{{ bag.get(key)|json_encode }}</td>
</tr>
<tr>
<th>{{ key }}</th>
{# JSON_UNESCAPED_SLASHES = 64, JSON_UNESCAPED_UNICODE = 256 #}
<td>{{ bag.get(key)|json_encode(64 b-or 256) }}</td>
</tr>
{% endfor %}
</tbody>
</table>

View File

@ -9,7 +9,8 @@
{% for key in data|keys|sort %}
<tr>
<th>{{ key }}</th>
<td>{{ data[key]|json_encode }}</td>
{# JSON_UNESCAPED_SLASHES = 64, JSON_UNESCAPED_UNICODE = 256 #}
<td>{{ data[key]|json_encode(64 b-or 256) }}</td>
</tr>
{% endfor %}
</tbody>