From 72e603f185dcaa9c7a2df2758b8aebb645f6d466 Mon Sep 17 00:00:00 2001 From: Artem Kotik Date: Sun, 30 Jun 2024 19:01:43 +0200 Subject: [PATCH] Add escapejs filter to diff template --- .../templates/netbox_config_diff/configcompliance/data.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/netbox_config_diff/templates/netbox_config_diff/configcompliance/data.html b/netbox_config_diff/templates/netbox_config_diff/configcompliance/data.html index 5c20e42..e845774 100644 --- a/netbox_config_diff/templates/netbox_config_diff/configcompliance/data.html +++ b/netbox_config_diff/templates/netbox_config_diff/configcompliance/data.html @@ -70,7 +70,7 @@
Diff
stickyFileHeaders: false, drawFileList: false, }; - const jsonDiff = `{{ instance.diff|safe }}`; + const jsonDiff = `{{ instance.diff|escapejs|safe }}`; var targetElement = document.getElementById('diffElement'); var diff2htmlUi = new Diff2HtmlUI(targetElement, jsonDiff, configuration); diff2htmlUi.draw();