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",