merged branch pvolok/fix_7540 (PR #7643)

This PR was submitted for the master branch but it was merged into the 2.2 branch instead (closes #7643).

Discussion
----------

[WebProfilerBundle] fixed output of bag values

| Q             | A
| ------------- | ---
| Bug fix?      | no
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #7540
| License       | MIT
| Doc PR        | -

Call json_encode with flags: JSON_UNESCAPED_SLASHES and
JSON_UNESCAPED_UNICODE

Commits
-------

7ee8b10 [WebProfilerBundle] fixed output of bag values
This commit is contained in:
Fabien Potencier 2013-04-12 14:36:59 +02:00
commit 9714cc2682
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>