From efb06bca62a1f28d4463f02b4b144fe13ffe04a0 Mon Sep 17 00:00:00 2001
From: Maximilian Moser <maximilian.moser@tuwien.ac.at>
Date: Wed, 2 Nov 2022 10:28:18 +0100
Subject: [PATCH] templates: add safe filter to html_tags

* otherwise, the HTML tags are escaped and thus not interpreted by the
  browser
---
 invenio_previewer/templates/invenio_previewer/pdfjs.html       | 3 ++-
 .../templates/semantic-ui/invenio_previewer/pdfjs.html         | 3 ++-
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/invenio_previewer/templates/invenio_previewer/pdfjs.html b/invenio_previewer/templates/invenio_previewer/pdfjs.html
index b12646c..d65fa81 100644
--- a/invenio_previewer/templates/invenio_previewer/pdfjs.html
+++ b/invenio_previewer/templates/invenio_previewer/pdfjs.html
@@ -2,6 +2,7 @@
 
   This file is part of Invenio.
   Copyright (C) 2015-2019 CERN.
+  Copyright (C)      2022 TU Wien.
 
   Invenio is free software; you can redistribute it and/or modify it
   under the terms of the MIT License; see LICENSE file for more details.
@@ -10,7 +11,7 @@
 {%- extends config.PREVIEWER_BASE_TEMPLATE %}
 
 {%- block html_tags %}
-  {{ html_tags }}
+  {{ html_tags|safe }}
 {%- endblock %}
 
 {%- block head %}
diff --git a/invenio_previewer/templates/semantic-ui/invenio_previewer/pdfjs.html b/invenio_previewer/templates/semantic-ui/invenio_previewer/pdfjs.html
index 28b7445..7dfda54 100644
--- a/invenio_previewer/templates/semantic-ui/invenio_previewer/pdfjs.html
+++ b/invenio_previewer/templates/semantic-ui/invenio_previewer/pdfjs.html
@@ -2,6 +2,7 @@
 
   This file is part of Invenio.
   Copyright (C) 2015-2020 CERN.
+  Copyright (C)      2022 TU Wien.
 
   Invenio is free software; you can redistribute it and/or modify it
   under the terms of the MIT License; see LICENSE file for more details.
@@ -10,7 +11,7 @@
 {%- extends config.PREVIEWER_BASE_TEMPLATE %}
 
 {%- block html_tags %}
-  {{ html_tags }}
+  {{ html_tags|safe }}
 {%- endblock %}
 
 {%- block head %}
-- 
GitLab