mirror of
https://github.com/reddit-archive/reddit.git
synced 2026-01-26 23:39:11 -05:00
empty urls are not valid urls
This commit is contained in:
@@ -314,6 +314,9 @@ def sanitize_url(url, require_scheme = False):
|
||||
False' is set, the url is returned with scheme 'http', provided it
|
||||
otherwise validates"""
|
||||
|
||||
if not url:
|
||||
return
|
||||
|
||||
url = url.strip()
|
||||
if url.lower() == 'self':
|
||||
return url
|
||||
|
||||
Reference in New Issue
Block a user