Skip to content

Commit

Permalink
Merge pull request #4452 from fecgov/feature/accounts-342-remove-mark…
Browse files Browse the repository at this point in the history
…-safe

Two reviews, merging
  • Loading branch information
rfultz authored Mar 9, 2021
2 parents 78adeba + d7f421d commit 152edb8
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions fec/home/templatetags/filters.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
from django.conf import settings
from django.templatetags.static import static
from django.utils.html import format_html
from django.utils.safestring import mark_safe
from wagtail.core.models import Page

register = template.Library()
Expand Down Expand Up @@ -71,7 +70,7 @@ def web_app_url(path):
def highlight_matches(text):
"""Replaces the highlight markers with span tags for digitalgov search results"""
highlighted_text = text.replace('\ue000', '<span class="t-highlight">').replace('\ue001', '</span>')
return mark_safe(highlighted_text)
return format_html(highlighted_text)


@register.filter(name='splitlines')
Expand Down

0 comments on commit 152edb8

Please sign in to comment.