mirror of
https://github.com/netbox-community/netbox.git
synced 2024-05-10 07:54:54 +00:00
Clean up usages of mark_safe()
This commit is contained in:
@@ -86,8 +86,8 @@ def placeholder(value):
|
||||
"""
|
||||
if value not in ('', None):
|
||||
return value
|
||||
placeholder = '<span class="text-muted">—</span>'
|
||||
return mark_safe(placeholder)
|
||||
|
||||
return mark_safe('<span class="text-muted">—</span>')
|
||||
|
||||
|
||||
@register.filter()
|
||||
|
@@ -109,9 +109,7 @@ def annotated_date(date_value):
|
||||
long_ts = date(date_value, 'DATETIME_FORMAT')
|
||||
short_ts = date(date_value, 'SHORT_DATETIME_FORMAT')
|
||||
|
||||
span = f'<span title="{long_ts}">{short_ts}</span>'
|
||||
|
||||
return mark_safe(span)
|
||||
return mark_safe(f'<span title="{long_ts}">{short_ts}</span>')
|
||||
|
||||
|
||||
@register.simple_tag
|
||||
|
Reference in New Issue
Block a user