From 4a93886019efad5901c574013581338540e59968 Mon Sep 17 00:00:00 2001 From: Simon Brugman Date: Thu, 6 Jul 2023 15:23:50 +0200 Subject: [PATCH] fix: jinja safe html Closes #275 --- popmon/visualization/templates/card.html | 8 ++++---- popmon/visualization/templates/core.html | 2 +- popmon/visualization/templates/section.html | 4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/popmon/visualization/templates/card.html b/popmon/visualization/templates/card.html index 0fbb6e00..b86ba207 100644 --- a/popmon/visualization/templates/card.html +++ b/popmon/visualization/templates/card.html @@ -12,7 +12,7 @@

{{metric.name | fmt_metric}}

{%- if metric.type in ['traffic_light', 'alert'] -%} - {{ metric.plot }} + {{ metric.plot | safe }} {%- else -%}
{%- include 'header.html' -%} - {{ sections }} + {{ sections | safe }} {%- include 'footer.html' -%} \ No newline at end of file diff --git a/popmon/visualization/templates/section.html b/popmon/visualization/templates/section.html index 6c505b2b..207abd14 100644 --- a/popmon/visualization/templates/section.html +++ b/popmon/visualization/templates/section.html @@ -25,7 +25,7 @@

{{ section_title }}

@@ -57,7 +57,7 @@

{{ feature.titles.get(ref, ref) }}

{%- for metric in plots -%} {%- with metric=metric -%} {%- include 'card.html' -%}