From 0bced8fe174de24ebd3823c93997cb2d2347dfe9 Mon Sep 17 00:00:00 2001 From: Andrew Godwin Date: Mon, 28 Nov 2022 22:14:52 -0700 Subject: A few hashtag fixups --- activities/models/hashtag.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'activities/models/hashtag.py') diff --git a/activities/models/hashtag.py b/activities/models/hashtag.py index a5754f7..7085b15 100644 --- a/activities/models/hashtag.py +++ b/activities/models/hashtag.py @@ -8,6 +8,7 @@ from django.db import models from django.utils import timezone from django.utils.safestring import mark_safe +from core.html import strip_html from core.models import Config from stator.models import State, StateField, StateGraph, StatorModel @@ -174,7 +175,7 @@ class Hashtag(StatorModel): Return a parsed and sanitized of hashtags found in content without leading '#'. """ - hashtag_hits = cls.hashtag_regex.findall(content) + hashtag_hits = cls.hashtag_regex.findall(strip_html(content)) hashtags = sorted({tag[1].lower() for tag in hashtag_hits}) return list(hashtags) -- cgit v1.2.3