mirror of
https://github.com/sileht/bird-lg.git
synced 2025-03-25 21:44:27 +01:00
Fix #63 by characters restriction
This commit is contained in:
parent
c84267edd8
commit
0115fe7918
1 changed files with 5 additions and 3 deletions
|
@ -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(){
|
|||
|
||||
});
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue