diff options
| author | 2019-07-02 14:15:49 +0100 | |
|---|---|---|
| committer | 2019-07-02 14:15:49 +0100 | |
| commit | 637067c62c414032085bd3f9d99c7ca2df2a3946 (patch) | |
| tree | 159f306e51433ce7a687b8fc748aa141b926097f /src | |
| parent | Add utils.http.url_validate() for best-effort url tidying (diff) | |
| signature | ||
url_validate() -> url_sanitise()
Diffstat (limited to 'src')
| -rw-r--r-- | src/utils/http.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/utils/http.py b/src/utils/http.py index e65e1e23..2885ebee 100644 --- a/src/utils/http.py +++ b/src/utils/http.py @@ -7,7 +7,7 @@ from src import utils REGEX_URL = re.compile("https?://[A-Z0-9{}]+".format(re.escape("-._~:/%?#[]@!$&'()*+,;=")), re.I) # best-effort tidying up of URLs -def url_validate(url: str): +def url_sanitise(url: str): if url.endswith(")"): # trim ")" from the end only if there's not a "(" to match it # google.com/) -> google.com/ |
