From a5aaef0f6362a33f4b42cb6b3df406c17ccf833f Mon Sep 17 00:00:00 2001 From: Tom Kralidis Date: Mon, 29 Jun 2020 14:13:19 -0400 Subject: [PATCH] only lower case for file extension evaluation (thanks @RousseauLambertLP for reporting) --- pygeoapi/templates/item.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pygeoapi/templates/item.html b/pygeoapi/templates/item.html index a3f08be..52ad0fb 100644 --- a/pygeoapi/templates/item.html +++ b/pygeoapi/templates/item.html @@ -1,8 +1,8 @@ {% extends "base.html" %} {# Optionally renders an img element, otherwise standard value or link rendering #} {% macro render_item_value(v, width) -%} - {% set val = v | string | trim | lower %} - {% if val|length and val.endswith(('.jpg', '.jpeg', '.png', '.gif', '.bmp')) %} + {% set val = v | string | trim %} + {% if val|length and val.lower().endswith(('.jpg', '.jpeg', '.png', '.gif', '.bmp')) %} {# Ends with image extension: render img element with link to image #} {% else %}