From b42dc73a003bad66f8d22502e6f21db8427f9a2b Mon Sep 17 00:00:00 2001 From: Andy Shapiro Date: Thu, 8 Feb 2024 11:03:24 -0500 Subject: [PATCH] remove repeated declaration --- hawc/apps/common/validators.py | 27 ++------------------------- 1 file changed, 2 insertions(+), 25 deletions(-) diff --git a/hawc/apps/common/validators.py b/hawc/apps/common/validators.py index db1118bae5..6075a6dcaf 100644 --- a/hawc/apps/common/validators.py +++ b/hawc/apps/common/validators.py @@ -9,33 +9,10 @@ from pydantic import BaseModel from pydantic import ValidationError as PydanticValidationError +from .clean.sanitize_html import valid_html_tags + tag_regex = re.compile(r"\w+)[^>]*>") hyperlink_regex = re.compile(r"href\s*=\s*['\"](.*?)['\"]") - - -valid_html_tags = { - "a", - "blockquote", - "br", - "div", - "em", - "h1", - "h2", - "h3", - "h4", - "h5", - "li", - "mark", - "ol", - "p", - "span", - "strong", - "sub", - "sup", - "s", - "ul", - "u", -} valid_scheme = {"", "http", "https"} valid_netloc_endings = { "canada.ca",