diff --git a/static/js/lg.js b/static/js/lg.js index 1a8b496..4038579 100644 --- a/static/js/lg.js +++ b/static/js/lg.js @@ -13,10 +13,13 @@ function change_url(loc){ function reload(){ loc = "/" + request_type + "/" + hosts + "/" + proto; if (request_type != "summary" ){ - if( request_args != undefined && request_args != ""){ + if( request_args != undefined && request_args != "" && /^[a-zA-Z0-9.:-\\/]*$/.test(request_args)){ + $(".request_args").css("border", ""); loc = loc + "?q=" + encodeURIComponent(request_args); change_url(loc) - } + } else { + $(".request_args").css("border", "solid 1px red"); + } } else { change_url(loc) } @@ -102,4 +105,3 @@ $(function(){ }); -