{% if component.tag %}
    {% if component.html %}
        <{{ component.tag }} {{ component.get_attr_text|safe }}>
            {{ html|safe }}
        </{{ component.tag }}
    {% else %}
        <{{ component.tag }} {{ component.get_attr_text|safe }}/>
    {% endif %}
{% else %}
    {{ component.html|safe }}
{% endif %}