Changed url validator to add http instead of https to the beginning of urls

This commit is contained in:
xemeds
2020-07-20 18:55:07 +00:00
parent c091efe84d
commit c6343893f4
3 changed files with 3 additions and 3 deletions
BIN
View File
Binary file not shown.
+2 -2
View File
@@ -31,8 +31,8 @@ def validate_URL(form, field):
# If the URL does not start with http:// and https:// # If the URL does not start with http:// and https://
if not(field.data.startswith("http://")) and not(field.data.startswith("https://")): if not(field.data.startswith("http://")) and not(field.data.startswith("https://")):
# Add https:// to the beginning of the URL # Add http:// to the beginning of the URL
field.data = "https://" + field.data field.data = "http://" + field.data
class URLForm(FlaskForm): class URLForm(FlaskForm):