Skip to content

Commit

Permalink
move content back to original position
Browse files Browse the repository at this point in the history
  • Loading branch information
shapiromatron committed Feb 8, 2024
1 parent 325bc76 commit d994eef
Showing 1 changed file with 14 additions and 15 deletions.
29 changes: 14 additions & 15 deletions hawc/apps/common/validators.py
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -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:
Expand Down

0 comments on commit d994eef

Please sign in to comment.