{% extends "base.html" %}

{% block title %}Single finding - {{ finding.get("name") }}{% endblock %}

{% block content %}
    <h1>Single finding</h1> <br>
    <h2>{{ finding.get("name") }}</h2>

    <a href="?outputSafely=true">Show safely</a> | <a href="?outputSafely=false">Show with better formatting</a> <br>

    {% for attr_name, attr_value in finding.items() %}
        <hr>
        <h3>{{ attr_name }}</h3>

        <div class="isolationWrapper">
        {% if attr_value is iterable and (attr_value is not string and attr_value is not mapping) %}  {# isinstance(x, list) #}
            <ul>
                {% for item in attr_value %}
                    <li>{{ item }}</li>
                {% endfor %}
            </ul>
        {% else %}
            {% if outputSafely %} {{ attr_value }} {% else %} {{ attr_value | safe }} {% endif %}
        {% endif %}

        </div>
    {% endfor %}

{% endblock %}