From b8a08f961553b50b03c19a8bfecafed0f77632bb Mon Sep 17 00:00:00 2001 From: Mark Veidemanis Date: Tue, 30 Aug 2022 09:29:04 +0100 Subject: [PATCH] Don't hash 4chan --- core/templates/ui/drilldown/search_partial.html | 6 ++++++ core/views/helpers.py | 3 +++ 2 files changed, 9 insertions(+) diff --git a/core/templates/ui/drilldown/search_partial.html b/core/templates/ui/drilldown/search_partial.html index 8bfe544..43a8f62 100644 --- a/core/templates/ui/drilldown/search_partial.html +++ b/core/templates/ui/drilldown/search_partial.html @@ -114,6 +114,12 @@ {% endif %} + {% if params.source == '4ch' %} + + {% else %} + + {% endif %} + {% if params.source == None %} {% elif params.source == 'all' %} diff --git a/core/views/helpers.py b/core/views/helpers.py index ac0dd59..8ce2dbc 100644 --- a/core/views/helpers.py +++ b/core/views/helpers.py @@ -171,6 +171,9 @@ def hash_list(user, data, hash_keys=False): else: data_copy = type(data)((data)) for index, item in enumerate(data_copy): + if "src" in item: + if item["src"] in settings.SAFE_SOURCES: + continue if isinstance(item, dict): for key, value in list(item.items()): if (