From: Thomas Citharel Date: Mon, 25 Jan 2016 21:02:44 +0000 (+0100) Subject: better display for txt X-Git-Tag: 2.0.0-beta.1~54^2~5 X-Git-Url: https://git.immae.eu/?a=commitdiff_plain;h=365a38984e32d152ec0170991a61bf704756cf1e;p=github%2Fwallabag%2Fwallabag.git better display for txt --- diff --git a/src/Wallabag/CoreBundle/Helper/EntriesExport.php b/src/Wallabag/CoreBundle/Helper/EntriesExport.php index 79fe6eaa..6e06086f 100644 --- a/src/Wallabag/CoreBundle/Helper/EntriesExport.php +++ b/src/Wallabag/CoreBundle/Helper/EntriesExport.php @@ -366,8 +366,8 @@ class EntriesExport { $content = ''; foreach ($this->entries as $entry) { - $content .= $entry->getTitle(); - $content .= strip_tags($entry->getContent()); + $content .= "\n\n" . str_repeat("=",100) . "\n\n" . $entry->getTitle() . "\n\n" . str_repeat("=",100) . "\n\n"; + $content .= trim(preg_replace('/\s+/S', ' ', strip_tags($entry->getContent()))) . "\n\n"; } return Response::create( $content, diff --git a/src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/entries.html.twig b/src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/entries.html.twig index 8ad24fbf..e9925e3d 100644 --- a/src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/entries.html.twig +++ b/src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/entries.html.twig @@ -107,7 +107,7 @@ {% if craue_setting('export_xml') %}
  • {% trans %}XML{% endtrans %}
  • {% endif %} {% if craue_setting('export_csv') %}
  • {% trans %}JSON{% endtrans %}
  • {% endif %} {% if craue_setting('export_json') %}
  • {% trans %}CSV{% endtrans %}
  • {% endif %} - {% if craue_setting('export_txt') %}
  • {% trans %}TXT{% endtrans %}
  • {% endif %} + {% if craue_setting('export_txt') %}
  • {% trans %}TXT{% endtrans %}
  • {% endif %}