mirror of
https://github.com/hugo-fixit/FixIt.git
synced 2026-08-24 15:28:57 +00:00
🐛 Fix: unencoded Content in Search Leads to JavaScript Execution Risk in autocomplete-js
Fixes #416
This commit is contained in:
+1
-1
@@ -233,7 +233,7 @@ class FixIt {
|
||||
const results = {};
|
||||
window._index.search(query).forEach(({ item, refIndex, matches }) => {
|
||||
let title = item.title;
|
||||
let content = item.content;
|
||||
let content = item.content.replace(/&/g, '&').replace(/</g, '<').replace(/>/g, '>')
|
||||
matches.forEach(({ indices, value, key }) => {
|
||||
if (key === 'content') {
|
||||
let offset = 0;
|
||||
|
||||
Reference in New Issue
Block a user