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:
anupamme 2026-09-29 03:20:19 +00:00
parent c0a596ef1c
commit 1ab1135358

View File

@ -279,6 +279,9 @@
onCallback:function(){
var location = $location.val();
if(location){
location = location.replace(/[&<>"']/g,function(c){
return {'&':'&amp;','<':'&lt;','>':'&gt;','"':'&quot;',"'":'&#39;'}[c];
});
result = searchItem.query(location);
if(result.length>10){
result = 10;