remove impractical title attribute from icon templatetag

This commit is contained in:
Richard Schreiber
2024-11-22 11:13:18 +01:00
parent de6f6025e2
commit 094c04df73

View File

@@ -28,11 +28,7 @@ register = template.Library()
@register.simple_tag
def icon(key, *args, **kwargs):
return format_html(
'<span class="fa fa-{} {}" aria-hidden="true"{}></span>',
'<span class="fa fa-{} {}" aria-hidden="true"></span>',
key,
kwargs["class"] if "class" in kwargs else "",
"" if "title" not in kwargs else format_html(
' title="{}"',
kwargs["title"]
)
)