url_validate() -> url_sanitise()
This commit is contained in:
parent
534854127b
commit
637067c62c
1 changed files with 1 additions and 1 deletions
|
@ -7,7 +7,7 @@ from src import utils
|
||||||
REGEX_URL = re.compile("https?://[A-Z0-9{}]+".format(re.escape("-._~:/%?#[]@!$&'()*+,;=")), re.I)
|
REGEX_URL = re.compile("https?://[A-Z0-9{}]+".format(re.escape("-._~:/%?#[]@!$&'()*+,;=")), re.I)
|
||||||
|
|
||||||
# best-effort tidying up of URLs
|
# best-effort tidying up of URLs
|
||||||
def url_validate(url: str):
|
def url_sanitise(url: str):
|
||||||
if url.endswith(")"):
|
if url.endswith(")"):
|
||||||
# trim ")" from the end only if there's not a "(" to match it
|
# trim ")" from the end only if there's not a "(" to match it
|
||||||
# google.com/) -> google.com/
|
# google.com/) -> google.com/
|
||||||
|
|
Loading…
Reference in a new issue