add URL validation for trailing slash (closes #18)
Signed-off-by: r4sas <r4sas@i2pmail.org>
This commit is contained in:
@@ -23,3 +23,9 @@ def check_writable(f):
|
||||
|
||||
def json_encode(s):
|
||||
return json.dumps(s, separators=(',',':')).encode()
|
||||
|
||||
|
||||
def validate_url(s):
|
||||
if not s.endswith('/'):
|
||||
s = s + "/"
|
||||
return s
|
||||
|
||||
Reference in New Issue
Block a user