{% load widget_tweaks safe_html %} {# Security: Icon SVGs are sanitized to prevent XSS. Only trusted SVG elements are allowed. #} {% if type == 'button' or type == 'submit' or type == 'reset' %} {% else %} {% if icon %} {{ icon|sanitize_svg }} {% if label %}{{ label }}{% endif %} {% else %} {{ label|default:content }} {% endif %} {% block link_content %}{% endblock %} {% endif %}