diff options
author | Jeremy Benoist <j0k3r@users.noreply.github.com> | 2016-02-04 17:46:02 +0100 |
---|---|---|
committer | Jeremy Benoist <j0k3r@users.noreply.github.com> | 2016-02-04 17:46:02 +0100 |
commit | 27c837dcd1640a7f5f0ed197e882eefd53ba8273 (patch) | |
tree | 4033b2ac82558c541c07bf7640ae58ef4cb90a22 /src | |
parent | 2ab20ed6f9abe94fc5405740ea1598efc3ff1c16 (diff) | |
parent | 0796532460b90cb3ef7ecbf86db6d0adc07c88b4 (diff) | |
download | wallabag-27c837dcd1640a7f5f0ed197e882eefd53ba8273.tar.gz wallabag-27c837dcd1640a7f5f0ed197e882eefd53ba8273.tar.zst wallabag-27c837dcd1640a7f5f0ed197e882eefd53ba8273.zip |
Merge pull request #1642 from wallabag/v2-escape-preview
Unescape content for Material card
Diffstat (limited to 'src')
-rw-r--r-- | src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/entries.html.twig | 28 |
1 files changed, 15 insertions, 13 deletions
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 c86b8d88..8ad24fbf 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 | |||
@@ -46,16 +46,17 @@ | |||
46 | <i class="card-title grey-text text-darken-4 activator mdi-navigation-more-vert right"></i> | 46 | <i class="card-title grey-text text-darken-4 activator mdi-navigation-more-vert right"></i> |
47 | {% endif %} | 47 | {% endif %} |
48 | 48 | ||
49 | <span class="card-title"><a href="{{ path('view', { 'id': entry.id }) }}">{{ entry.title|raw|striptags|slice(0, 42) }}</a></span> | 49 | <span class="card-title"><a href="{{ path('view', { 'id': entry.id }) }}">{{ entry.title|striptags|slice(0, 42)|raw }}</a></span> |
50 | 50 | ||
51 | {% if entry.readingTime > 0 %} | 51 | <div class="estimatedTime grey-text"> |
52 | <div class="estimatedTime grey-text"><span class="tool reading-time">{% trans %}estimated reading time{% endtrans %}: {{ entry.readingTime }} min</span></div> | 52 | <span class="tool reading-time"> |
53 | {% else %} | 53 | {% trans %}estimated reading time{% endtrans %}: |
54 | <div class="estimatedTime grey-text"><span class="tool reading-time">{% trans %}estimated reading time{% endtrans %}: <small class="inferieur"><</small> 1 min</span></div> | 54 | {% if entry.readingTime > 0 %}{{ entry.readingTime }}{% else %}<small class="inferieur"><</small> 1{% endif %} min |
55 | {% endif %} | 55 | </span> |
56 | </div> | ||
56 | 57 | ||
57 | {% if entry.previewPicture is null %} | 58 | {% if entry.previewPicture is null %} |
58 | <p>{{ entry.content|striptags|slice(0, 300) }}…</p> | 59 | <p>{{ entry.content|striptags|slice(0, 300)|raw }}…</p> |
59 | {% endif %} | 60 | {% endif %} |
60 | </div> | 61 | </div> |
61 | </div> | 62 | </div> |
@@ -65,13 +66,14 @@ | |||
65 | <i class="card-title grey-text text-darken-4 mdi-card-close right"></i> | 66 | <i class="card-title grey-text text-darken-4 mdi-card-close right"></i> |
66 | <span class="card-title"><a href="{{ path('view', { 'id': entry.id }) }}">{{ entry.title|raw }}</a></span> | 67 | <span class="card-title"><a href="{{ path('view', { 'id': entry.id }) }}">{{ entry.title|raw }}</a></span> |
67 | 68 | ||
68 | {% if entry.readingTime > 0 %} | 69 | <div class="estimatedTime grey-text"> |
69 | <div class="estimatedTime grey-text"><span class="tool reading-time">{% trans %}estimated reading time{% endtrans %}: {{ entry.readingTime }} min</span></div> | 70 | <span class="tool reading-time"> |
70 | {% else %} | 71 | {% trans %}estimated reading time{% endtrans %}: |
71 | <div class="estimatedTime grey-text"><span class="tool reading-time">{% trans %}estimated reading time{% endtrans %}: <small class="inferieur"><</small> 1 min</span></div> | 72 | {% if entry.readingTime > 0 %}{{ entry.readingTime }}{% else %}<small class="inferieur"><</small> 1{% endif %} min |
72 | {% endif %} | 73 | </span> |
74 | </div> | ||
73 | 75 | ||
74 | <p>{{ entry.content|striptags|slice(0, 300) }}…</p> | 76 | <p>{{ entry.content|striptags|slice(0, 300)|raw }}…</p> |
75 | </div> | 77 | </div> |
76 | {% endif %} | 78 | {% endif %} |
77 | 79 | ||