From d994eefb63739ffca708da163e7f97baf37fc23b Mon Sep 17 00:00:00 2001 From: Andy Shapiro Date: Thu, 8 Feb 2024 10:22:06 -0500 Subject: [PATCH] move content back to original position --- hawc/apps/common/validators.py | 29 ++++++++++++++--------------- 1 file changed, 14 insertions(+), 15 deletions(-) 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: