diff --git a/hawc/apps/common/validators.py b/hawc/apps/common/validators.py index c48edcb904..db1118bae5 100644 --- a/hawc/apps/common/validators.py +++ b/hawc/apps/common/validators.py @@ -13,21 +13,6 @@ hyperlink_regex = re.compile(r"href\s*=\s*['\"](.*?)['\"]") -valid_scheme = {"", "http", "https"} -valid_netloc_endings = { - "canada.ca", - ".edu", - ".gov", - ".who.int", - "doi.org", - "elsevier.com", - "public.tableau.com", - "sciencedirect.com", - "sharepoint.com", - "hawcproject.org", - "zenodo.org", -} - valid_html_tags = { "a", "blockquote", @@ -51,6 +36,20 @@ "ul", "u", } +valid_scheme = {"", "http", "https"} +valid_netloc_endings = { + "canada.ca", + ".edu", + ".gov", + ".who.int", + "doi.org", + "elsevier.com", + "public.tableau.com", + "sciencedirect.com", + "sharepoint.com", + "hawcproject.org", + "zenodo.org", +} def validate_html_tags(html: str, field: str | None = None) -> str: