From e0d0dacf4cd356d8f748e23ecfcea6fcedd69dd8 Mon Sep 17 00:00:00 2001 From: Justin Drew <2396364+jdrew82@users.noreply.github.com> Date: Fri, 5 Jan 2024 12:03:20 -0600 Subject: [PATCH] =?UTF-8?q?refactor:=20=E2=99=BB=EF=B8=8F=20Tweak=20use=20?= =?UTF-8?q?of=20mark=5Fsafe?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- nautobot_ssot/templatetags/render_diff.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/nautobot_ssot/templatetags/render_diff.py b/nautobot_ssot/templatetags/render_diff.py index 549b13586..585e4859f 100644 --- a/nautobot_ssot/templatetags/render_diff.py +++ b/nautobot_ssot/templatetags/render_diff.py @@ -32,7 +32,7 @@ def render_diff_recursive(diff): """ result = "" for record_type, children in diff.items(): - child_result = "" + child_result = mark_safe("") # noqa: S308 for child, child_diffs in children.items(): if "+" in child_diffs and "-" not in child_diffs: child_class = "diff-added" @@ -54,7 +54,7 @@ def render_diff_recursive(diff): child_result += render_diff_recursive(child_diffs) child_result += "" - result += format_html("
  • {}
  • ", record_type, mark_safe(child_result)) # noqa: S308 + result += format_html("
  • {}
  • ", record_type, child_result) return result @@ -62,4 +62,4 @@ def render_diff_recursive(diff): def render_diff(diff): """Render a DiffSync diff dict to HTML.""" html_text = render_diff_recursive(diff) - return format_html("", mark_safe(html_text)) # noqa: S308 + return format_html("", html_text)