diff options
author | Florian Dold <florian.dold@gmail.com> | 2018-01-19 05:22:38 +0100 |
---|---|---|
committer | Florian Dold <florian.dold@gmail.com> | 2018-01-19 05:22:38 +0100 |
commit | b95ad6559fc584f0dfa1b4366c917f9556d0ac6d (patch) | |
tree | 6cdf87b63a477db49cac0b4e063482d212671573 | |
parent | ef55ff99e52c80db704031d615e30f2ee30859b6 (diff) | |
download | blog-b95ad6559fc584f0dfa1b4366c917f9556d0ac6d.tar.gz blog-b95ad6559fc584f0dfa1b4366c917f9556d0ac6d.tar.bz2 blog-b95ad6559fc584f0dfa1b4366c917f9556d0ac6d.zip |
teaser to text
-rw-r--r-- | talerblog/blog/content.py | 2 | ||||
-rw-r--r-- | talerblog/blog/templates/index.html | 4 |
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> |