diff --git a/content.py b/content.py index 24e7afeda..c23b5e9a5 100644 --- a/content.py +++ b/content.py @@ -1023,6 +1023,7 @@ def _get_simplified_content(content: str) -> str: def detect_dogwhistles(content: str, dogwhistles: {}) -> {}: """Returns a dict containing any detected dogwhistle words """ + content = remove_html(content) result = {} words = _get_simplified_content(content).split(' ') for whistle, category in dogwhistles.items(): @@ -1078,6 +1079,7 @@ def detect_dogwhistles(content: str, dogwhistles: {}) -> {}: } else: result[whistle]['count'] += 1 + break return result