empty urls are not valid urls

This commit is contained in:
spez
2009-04-17 15:04:06 -07:00
parent 599699468e
commit 2e5ad90213

View File

@@ -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