diff --git a/www/extras/addHTTP.js b/www/extras/addHTTP.js index 7e3785925..0a3cc1ba8 100644 --- a/www/extras/addHTTP.js +++ b/www/extras/addHTTP.js @@ -1,8 +1,10 @@ function addHTTP(element) { - if (!element.value.match("http://")) { - element.value = "http://"+element.value; - } - if (!element.value.match(/^http:\/\/.+\..+/)){ - alert("This is not a valid url. Please check if it is correct."); - } + if (element.value != "") { + if (!element.value.match("http://")) { + element.value = "http://"+element.value; + } + if (!element.value.match(/^http:\/\/.+\..+/)){ + alert("This is not a valid url. Please check if it is correct."); + } + } }