mirror of
https://github.com/mumuy/data_location.git
synced 2026-11-30 12:53:35 +08:00
fix: add output encoding in index.html
The location search functionality accepts user input through the search field and passes it to searchItem Addresses CWE-79
This commit is contained in:
parent
c0a596ef1c
commit
1ab1135358
@ -279,6 +279,9 @@
|
||||
onCallback:function(){
|
||||
var location = $location.val();
|
||||
if(location){
|
||||
location = location.replace(/[&<>"']/g,function(c){
|
||||
return {'&':'&','<':'<','>':'>','"':'"',"'":'''}[c];
|
||||
});
|
||||
result = searchItem.query(location);
|
||||
if(result.length>10){
|
||||
result = 10;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user