summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFlorian Dold <florian.dold@gmail.com>2018-01-19 05:22:38 +0100
committerFlorian Dold <florian.dold@gmail.com>2018-01-19 05:22:38 +0100
commitb95ad6559fc584f0dfa1b4366c917f9556d0ac6d (patch)
tree6cdf87b63a477db49cac0b4e063482d212671573
parentef55ff99e52c80db704031d615e30f2ee30859b6 (diff)
downloadblog-b95ad6559fc584f0dfa1b4366c917f9556d0ac6d.tar.gz
blog-b95ad6559fc584f0dfa1b4366c917f9556d0ac6d.tar.bz2
blog-b95ad6559fc584f0dfa1b4366c917f9556d0ac6d.zip
teaser to text
-rw-r--r--talerblog/blog/content.py2
-rw-r--r--talerblog/blog/templates/index.html4
2 files changed, 3 insertions, 3 deletions
diff --git a/talerblog/blog/content.py b/talerblog/blog/content.py
index 3360517..4aeb865 100644
--- a/talerblog/blog/content.py
+++ b/talerblog/blog/content.py
@@ -65,7 +65,7 @@ def add_from_html(resource_name, teaser_paragraph=0, title=None):
teaser = soup.find("p", attrs={"id":["teaser"]})
if teaser is None:
- teaser = str(paragraphs[teaser_paragraph])
+ teaser = paragraphs[teaser_paragraph].get_text()
else:
teaser = teaser.get_text()
re_proc = re.compile("^/essay/[^/]+/data/[^/]+$")
diff --git a/talerblog/blog/templates/index.html b/talerblog/blog/templates/index.html
index 290481b..40cd7ea 100644
--- a/talerblog/blog/templates/index.html
+++ b/talerblog/blog/templates/index.html
@@ -35,9 +35,9 @@
<div>
{% for article in articles %}
<div class="notice">
- <h3 class="taler-installed-show"><a href="{{ url_for("article", article_name=article.slug) }}">{{article.title}}</a></h3>
+ <h3 class="taler-installed-show"><a href="{{ url_for('article', article_name=article.slug) }}">{{article.title}}</a></h3>
<h3 class="taler-installed-hide">{{article.title}} <span style="font-size: small;">(install wallet to buy/read)</span></h3>
- <p>{{ article.teaser|safe }} <a class="taler-installed-show" href="{{ url_for("article", article_name=article.slug) }}">(Read more...)</a></p>
+ <p>{{ article.teaser|safe }} <a class="taler-installed-show" href="{{ url_for('article', article_name=article.slug) }}">(Read more...)</a></p>
</div>
{% else %}
<em>(No articles available)</em>