]> git.immae.eu Git - github/wallabag/wallabag.git/commitdiff
Merge pull request #1642 from wallabag/v2-escape-preview
authorJeremy Benoist <j0k3r@users.noreply.github.com>
Thu, 4 Feb 2016 16:46:02 +0000 (17:46 +0100)
committerJeremy Benoist <j0k3r@users.noreply.github.com>
Thu, 4 Feb 2016 16:46:02 +0000 (17:46 +0100)
Unescape content for Material card

1  2 
src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/entries.html.twig

index c86b8d888d3aeb98a19da885e7480782214f14bf,0c35de2d40bb65dd0657edccb423289dff6bda6a..8ad24fbf8d9a2007c459194d27a1066e9e0bed3d
                                  <i class="card-title grey-text text-darken-4 activator mdi-navigation-more-vert right"></i>
                              {% endif %}
  
-                             <span class="card-title"><a href="{{ path('view', { 'id': entry.id }) }}">{{ entry.title|raw|striptags|slice(0, 42) }}</a></span>
+                             <span class="card-title"><a href="{{ path('view', { 'id': entry.id }) }}">{{ entry.title|striptags|slice(0, 42)|raw }}</a></span>
  
-                             {% if entry.readingTime > 0 %}
-                                 <div class="estimatedTime grey-text"><span class="tool reading-time">{% trans %}estimated reading time{% endtrans %}: {{ entry.readingTime }} min</span></div>
-                             {% else %}
-                                 <div class="estimatedTime grey-text"><span class="tool reading-time">{% trans %}estimated reading time{% endtrans %}: <small class="inferieur">&lt;</small> 1 min</span></div>
-                             {% endif %}
+                             <div class="estimatedTime grey-text">
+                                 <span class="tool reading-time">
+                                     {% trans %}estimated reading time{% endtrans %}:
+                                     {% if entry.readingTime > 0 %}{{ entry.readingTime }}{% else %}<small class="inferieur">&lt;</small> 1{% endif %} min
+                                 </span>
+                             </div>
  
                              {% if entry.previewPicture is null %}
-                                 <p>{{ entry.content|striptags|slice(0, 300) }}&hellip;</p>
+                                 <p>{{ entry.content|striptags|slice(0, 300)|raw }}&hellip;</p>
                              {% endif %}
                          </div>
                      </div>
                              <i class="card-title grey-text text-darken-4 mdi-card-close right"></i>
                              <span class="card-title"><a href="{{ path('view', { 'id': entry.id }) }}">{{ entry.title|raw }}</a></span>
  
-                             {% if entry.readingTime > 0 %}
-                                 <div class="estimatedTime grey-text"><span class="tool reading-time">{% trans %}estimated reading time{% endtrans %}: {{ entry.readingTime }} min</span></div>
-                             {% else %}
-                                 <div class="estimatedTime grey-text"><span class="tool reading-time">{% trans %}estimated reading time{% endtrans %}: <small class="inferieur">&lt;</small> 1 min</span></div>
-                             {% endif %}
+                             <div class="estimatedTime grey-text">
+                                 <span class="tool reading-time">
+                                     {% trans %}estimated reading time{% endtrans %}:
+                                     {% if entry.readingTime > 0 %}{{ entry.readingTime }}{% else %}<small class="inferieur">&lt;</small> 1{% endif %} min
+                                 </span>
+                             </div>
  
-                             <p>{{ entry.content|striptags|slice(0, 300) }}&hellip;</p>
+                             <p>{{ entry.content|striptags|slice(0, 300)|raw }}&hellip;</p>
                          </div>
                      {% endif %}
  
      {% endif %}
          <h4 class="center">{% trans %}Export{% endtrans %}</h4>
          <ul>
 -            {% if export_epub %}<li class="bold"><a class="waves-effect" href="{{ path('export_entries', { 'category': currentRoute, 'format': 'epub' }) }}">{% trans %}EPUB{% endtrans %}</a></li>{% endif %}
 -            {% if export_mobi %}<li class="bold"><a class="waves-effect" href="{{ path('export_entries', { 'category': currentRoute, 'format': 'mobi' }) }}">{% trans %}MOBI{% endtrans %}</a></li>{% endif %}
 -            {% if export_pdf %}<li class="bold"><a class="waves-effect" href="{{ path('export_entries', { 'category': currentRoute, 'format': 'pdf' }) }}">{% trans %}PDF{% endtrans %}</a></li>{% endif %}
 -            {% if export_xml %}<li class="bold"><a class="waves-effect" href="{{ path('export_entries', { 'category': currentRoute, 'format': 'xml' }) }}">{% trans %}XML{% endtrans %}</a></li>{% endif %}
 -            {% if export_csv %}<li class="bold"><a class="waves-effect" href="{{ path('export_entries', { 'category': currentRoute, 'format': 'json' }) }}">{% trans %}JSON{% endtrans %}</a></li>{% endif %}
 -            {% if export_json %}<li class="bold"><a class="waves-effect" href="{{ path('export_entries', { 'category': currentRoute, 'format': 'csv' }) }}">{% trans %}CSV{% endtrans %}</a></li>{% endif %}
 -            {% if export_txt %}<li class="bold"><del><a class="waves-effect" href="{{ path('export_entries', { 'category': currentRoute, 'format': 'txt' }) }}">{% trans %}TXT{% endtrans %}</a></del></li>{% endif %}
 +            {% if craue_setting('export_epub') %}<li class="bold"><a class="waves-effect" href="{{ path('export_entries', { 'category': currentRoute, 'format': 'epub' }) }}">{% trans %}EPUB{% endtrans %}</a></li>{% endif %}
 +            {% if craue_setting('export_mobi') %}<li class="bold"><a class="waves-effect" href="{{ path('export_entries', { 'category': currentRoute, 'format': 'mobi' }) }}">{% trans %}MOBI{% endtrans %}</a></li>{% endif %}
 +            {% if craue_setting('export_pdf') %}<li class="bold"><a class="waves-effect" href="{{ path('export_entries', { 'category': currentRoute, 'format': 'pdf' }) }}">{% trans %}PDF{% endtrans %}</a></li>{% endif %}
 +            {% if craue_setting('export_xml') %}<li class="bold"><a class="waves-effect" href="{{ path('export_entries', { 'category': currentRoute, 'format': 'xml' }) }}">{% trans %}XML{% endtrans %}</a></li>{% endif %}
 +            {% if craue_setting('export_csv') %}<li class="bold"><a class="waves-effect" href="{{ path('export_entries', { 'category': currentRoute, 'format': 'json' }) }}">{% trans %}JSON{% endtrans %}</a></li>{% endif %}
 +            {% if craue_setting('export_json') %}<li class="bold"><a class="waves-effect" href="{{ path('export_entries', { 'category': currentRoute, 'format': 'csv' }) }}">{% trans %}CSV{% endtrans %}</a></li>{% endif %}
 +            {% if craue_setting('export_txt') %}<li class="bold"><del><a class="waves-effect" href="{{ path('export_entries', { 'category': currentRoute, 'format': 'txt' }) }}">{% trans %}TXT{% endtrans %}</a></del></li>{% endif %}
          </ul>
      </div>