changeset 275:9cc91a3d6862

theme: Fix the default theme's templates after changes in Jinja's wrapper.
author Ludovic Chabant <ludovic@chabant.com>
date Sun, 01 Mar 2015 18:00:10 -0800
parents 1163bd034dc5
children a5d21fac8e3f
files piecrust/resources/theme/templates/default.html piecrust/resources/theme/templates/partial_post.html
diffstat 2 files changed, 9 insertions(+), 9 deletions(-) [+]
line wrap: on
line diff
--- a/piecrust/resources/theme/templates/default.html	Sun Mar 01 17:59:26 2015 -0800
+++ b/piecrust/resources/theme/templates/default.html	Sun Mar 01 18:00:10 2015 -0800
@@ -77,20 +77,20 @@
         {% if page.tags %}
         <div class="tags">
             <span>Posted in</span>
-        {% for t in page.tags %}
-        <span class="tag"><a href="{{ pctagurl(t) }}">{{t}}</a>{% if not loop.last %}, {% endif %}</span>
-        {% endfor %}
+        {% for t in page.tags -%}
+            <span class="tag"><a href="{{ pctagurl(t) }}">{{t}}</a>{% if not loop.last %}, {% endif %}</span>
+        {%- endfor %}
         </div>
         {% endif %}
 
-        {{ content|raw }}
+        {{ content|safe }}
         {% endblock %}
     </section>
     <footer>
         {% block footer %}
         {% endblock %}
-        {{ piecrust.debug_info|raw }}
-        <p>{{ piecrust.branding|raw }}</p>
+        {{ piecrust.debug_info|safe }}
+        <p>{{ piecrust.branding|safe }}</p>
     </footer>
   </div>
 </body>
--- a/piecrust/resources/theme/templates/partial_post.html	Sun Mar 01 17:59:26 2015 -0800
+++ b/piecrust/resources/theme/templates/partial_post.html	Sun Mar 01 18:00:10 2015 -0800
@@ -4,9 +4,9 @@
         <small>{{ post.date }}
             {% if post.tags %}
             in 
-            {% for t in post.tags %}
+            {% for t in post.tags -%}
             <a href="{{ pctagurl(t) }}">{{ t }}</a>{% if not loop.last %}, {% endif %}
-            {% endfor %}
+            {%- endfor %}
             {% endif %}
             {% if post.category %}
             | <a href="{{ pccaturl(post.category) }}">{{ post.category }}</a>
@@ -14,6 +14,6 @@
         </small>
     </header>
     <section>
-        {{ post.content|raw }}
+        {{ post.content|safe }}
     </section>
 </article>