Merge pull request #87 from anupamme/fix-repo-data-location-multi-agent-cwe-79-index-html

fix: add output encoding in index.html (CWE-79)
This commit is contained in:
路人甲 2026-09-29 17:10:36 +08:00 committed by GitHub
commit 5d5d24dc2d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

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;