@ -20,7 +20,7 @@
{% macro img_description(media) -%}
{%- if media.big -%}<a href='{{ media.big_url }}'>Full size</a>{%- endif -%}
{# clean up tags and whitespace, including newlines, in the description #}
{%- if media.description -%}<br>{{ media.description | striptags }}{%- endif -%}
{%- if media.description -%}<br>{{ media.description }}{%- endif -%}
{%- if media.exif -%}
<div class='film-meta'>
{%- if media.exif.iso -%}<abbr title='film speed'>{{ media.exif.iso }}</abbr> {%- endif -%}
@ -124,8 +124,11 @@ def read_markdown(filename):
# will be available, this can be removed.
MD.Meta = {}
html = MD.convert(text)
# remove remaining linebreaks
html = "".join(html.splitlines())
# Mark HTML with Markup to prevent jinja2 autoescaping
output = {"description": Markup(MD.convert(text))}
output = {"description": Markup(html)}
try:
meta = MD.Meta.copy()
@ -1,4 +1,10 @@
Title: Foo Bar
Location: Bavaria
This is a funny description of this image
This is a *funny* **description** of this image
With a nice list
* item 1
* item 2
* item 3