Browse Source

fix nl2br filter

master
ghost 10 months ago
parent
commit
48339a1076
  1. 4
      src/Twig/AppExtension.php
  2. 2
      templates/default/main/index.html.twig
  3. 2
      templates/default/main/namespace.html.twig
  4. 2
      templates/default/main/transaction.html.twig

4
src/Twig/AppExtension.php

@ -92,9 +92,7 @@ class AppExtension extends AbstractExtension @@ -92,9 +92,7 @@ class AppExtension extends AbstractExtension
case \Kvazar\Index\Manticore::TYPE_STRING:
return nl2br(
$value
);
return (string) $value;
case \Kvazar\Index\Manticore::TYPE_BIN:

2
templates/default/main/index.html.twig

@ -27,7 +27,7 @@ @@ -27,7 +27,7 @@
{{ record.key | format_type(record.type.key) }}
</div>
<div class="mb-20 of-a">
{{ record.value | format_type(record.type.value) }}
{{ record.value | format_type(record.type.value) | nl2br }}
</div>
<div class="f-s-12">
{{ record.time | format_date }} {{ 'in' | trans }} {{ record.block }}

2
templates/default/main/namespace.html.twig

@ -28,7 +28,7 @@ @@ -28,7 +28,7 @@
{{ record.key | format_type(record.type.key) }}
</div>
<div class="mb-20 of-a">
{{ record.value | format_type(record.type.value) }}
{{ record.value | format_type(record.type.value) | nl2br }}
</div>
<div class="f-s-12">
{{ record.time | format_date }} {{ 'in' | trans }} {{ record.block }}

2
templates/default/main/transaction.html.twig

@ -28,7 +28,7 @@ @@ -28,7 +28,7 @@
{{ record.key | format_type(record.type.key) }}
</div>
<div class="mb-20 of-a">
{{ record.value | format_type(record.type.value) }}
{{ record.value | format_type(record.type.value) | nl2br }}
</div>
<div class="f-s-12">
{{ record.time | format_date }} {{ 'in' | trans }} {{ record.block }}

Loading…
Cancel
Save